On Jul 31, 2006, at 9:38 AM, Sean McCollum wrote:
Here's the situation: Table: class Columns: name, id (both VARCHAR) Table: student - Columns: name, id (both VARCHAR) Table link - Columns: pid, cid (both VARCHAR) This table links students and classes 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.
select * from student where id in ( select id from class where class.id = "A") AND id in ( select id from class where class.id = "B") _______________________________________________
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>
