Hi, I have 3 tables that I am trying to search across, and could use some help on how to structure the query. I have a users table, a newsletter table, and an articles table. The newsletter table has a user_id column, and the articles table has a newsletter_id column. A user can have multiple newsletters, and a newsletter can have multiple articles. What I would like to do is find the list of users that have only newletters with no content.
My current query is as follows: select users.id from users where users.id in (select newletters.user_id from newletters left join articles on newletters.id = articles.newsletter_id where articles.newsletter_id is null); But I believe this is finding users that have any empty newletters, and not users that have only empty newletters. How could I change this to return only the users that have only empty newsletters? Thanks, Simon