Re: Help with select statement

From: Joel Garry <joel-garry_at_home.com>
Date: 10 Apr 2003 17:14:52 -0700
Message-ID: <91884734.0304101614.4705d3b9_at_posting.google.com>


jlkilian_at_uwm.edu (Jen K) wrote in message news:<170db79d.0304101029.f09b0c2_at_posting.google.com>...
> hi,
> My professor has asked us to create a Select statement that even he
> can't seem to figure out. We would like to know the Student IDs of
> students who have enrolled in every class offered. Here is a very
> simplified table structure (:
> Student(studentID[pk], sName)
> Catalog(courseID[pk], cName)
> CourseSchedule(termNo[pk], courseID[references catalog.courseID])
>
> Can anyone help?
> Thanks!
> Jen

Too lazy to try it, but maybe
select studentID from ... having count(courseID) = (select count(*) from catalog) group by studentID

jg

--
_at_home.com is bogus
"(Loud choking sobs.)(Nose-blowing.)(Shaky exhale.)Thank you." - Carolyn Hax
Received on Fri Apr 11 2003 - 02:14:52 CEST

Original text of this message