Hi
I am looking for help with a problem I haven't figured out how to do.
Below is a
query which gives me a count of the number of applicants registered for
courses. With that I can get when the course is full, and how many are on
the waiting list.. Now what I would REALLY like is all this info, but only
display it for ONE applicant. adding "AND reservation.applicantid='1'"
affects the count (which calculates coursecount as '1' since it
is limited to that one person, who can only register for one class once)
so that won't work.
How can I get this coursecount, AND limit the display to 1 applicant?
any help would be greatly appreciated.
--------------
SELECT count(reservation.coursesid) as
coursecount,reservation.applicantid,
courses.coursetitle,courses.coursesid,reservationid,max
FROM courses,applicant LEFT JOIN reservation
ON (reservation.applicantid = applicant.applicantid AND
reservation.coursesid = courses.coursesid)
where reservation.reservationid IS NOT NULL
group by courses.coursetitle
order by coursetitle
--------------
Thomas Harris
Lab Specialist
Teaching and Learning Technologies Lab
(812) 855-7829
(filter fodder: sql, query)
| Thread |
|---|
| • getting count of courses for 1 applicant | tgharris | 9 May |