I have the following query which counts the records from a table called
registration that have an schedule_id that matches a record in another
table called schedules. The below query works fine but how can I get it
to return a COUNT() of 0 each instance where there is no record in the
registration table that matches a schedules.id record?
SELECT schedules.id, schedules.start_date, schedules.end_date,
COUNT(schedules.id) FROM schedules,
registration_and_attendance
WHERE registration_and_attendance.schedule_id = schedules.id
GROUP BY schedules.id ORDER BY start_date
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]