Sean,

Hi! Did you try this solution that I proposed :

SELECT person.name FROM person, class, link WHERE
link.pid=person.id AND link.cid=class.id AND class.name IN ('A', 'B')
GROUP BY person.name
HAVING count(*) = 2

So if you wanted to search across 3 classes, you'd write :

SELECT person.name FROM person, class, link WHERE
link.pid=person.id AND link.cid=class.id AND class.name IN ('A', 'B', 'C')
GROUP BY person.name
HAVING count(*) = 3

Regards,

Narinder.


> Hello all. I inadvertently sent some of my replies on Friday to
> individuals and not back to the nug. Whoops. Thanks for all of the
> replies. I've gotten some great help from the nug. I've learned a few
> cool things, but I haven't yet figured out my original problem.
> 
> Here's the situation:
> 

<snip>

> What I'm still after is only students in a specific set of classes.
> For example - A & B. (A recordset containing only Narinder and Norman
> is what i'd want - They are the only two students who are in both
> classes A & B) I've tried various forms of GROUP BY and COUNT, but I
> haven't been able to get any results.


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to