Hi,
Here is a table that I am working with:
PERSON | HAS
--------------------------------------------------------
John | Laptop
John | Cell Phone
John | PS3
Sally | Cell Phone
Sally | Laptop
Jane | Laptop
I want my query to return the set of people who own all 3 items (Laptop, Cell Phone, PS3)....
So in this example above, the only name that should come up is "John"
One catch, this has to be dynamic, so future items can be added to the list. Basically, it's suppose to count all items in the list and see if a person owns all of them.
Please help.
Here is a table that I am working with:
PERSON | HAS
--------------------------------------------------------
John | Laptop
John | Cell Phone
John | PS3
Sally | Cell Phone
Sally | Laptop
Jane | Laptop
I want my query to return the set of people who own all 3 items (Laptop, Cell Phone, PS3)....
So in this example above, the only name that should come up is "John"
One catch, this has to be dynamic, so future items can be added to the list. Basically, it's suppose to count all items in the list and see if a person owns all of them.
Please help.
Comment