I have a problem getting proper result from tables.
I have 3 tables:
Table: Articles
|article_id | article_title |
|1 | Title 1 |
|2 | Title 2 |
Table: Invited_to_read
|user_id | article_id |
|10 | 1 |
|20 | 1 |
|10 | 2 |
|10 | 3 |
Table: readed
|user_id | article_id |
|10 | 1 |
|20 | 1 |
|30 | 1 |
|20 | 2 |
What I want to get information if everybody who was invited also read article, result must be true, otherwise false.
For example if I want to get information for article_id = 1, then I should get TRUE as ll invited users readed it.
For example if I want to get information for article_id = 2, then I should get FALSE as user at least one user who invited not confirmed read.
For example if I want to get information for article_id = 3, then I should get FALSE as there is no any user confirmed read.
If some user, who is not invited for reading article confirm it, its not important at all.
So bottom line. I need to know if all invited users readed article or not.
Thank you.