You will need to use subqueries to achieve this.
Here's a starting point:
Subquery basics
at:
http://allenbrowne.com/subquery-01.html
It may be possible to create a query that groups by the person and book,
where the book is IN a list of books, and take the count to see if you got
all 3. But you need to be sure you avoid the case where someone read a book
twice.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
<ab*************@gmail.comwrote in message
news:47**********************************@s19g2000 prg.googlegroups.com...
Hi,
I'm having the following problem. I have a table that contains
information about books people read, i.e. each row has two columns,
people id and book id.
I need to do the following query: retrieve the list of all people that
read ALL the books in a given list, e.g. all the people that read book
X and book Y and book Z.
Tu further complicate the situation, an extended query also include an
exclusion crieteria, i.e. a list of books that the user should not
have read.
I really have no clue on how to approach this.
Any help will be much appricated.
Abe.