casperthedog
Instructor
I have two tables. One of COURSES, and one of DELEGATES.
Each COURSE has a unique number (courseID). Each time a delegate books onto a new course, a new record is created in the delegates table i.e. all the delegate information is repeated as a new record EXCEPT the field 'courseID' which has the ID of the new course they have enrolled on.
I want to run a query which shows all courses and how many delegates are booked on each. If I use both tables and perform a count of delegates with the same course ID, the query only shows those courses for which there is someone booked on. In other words, if there is a course with no bookings, it doesn't appear on the query.
I'd like this:
Basic Hygene 27/01/2002 4 delegates
Basic Hygene 30/01/2002 0 delegates
Basic Hygene 02/02/2002 3 delegates
...instead of this:
Basic Hygene 27/01/2002 4 delegates
Basic Hygene 02/02/2002 3 delegates
Each COURSE has a unique number (courseID). Each time a delegate books onto a new course, a new record is created in the delegates table i.e. all the delegate information is repeated as a new record EXCEPT the field 'courseID' which has the ID of the new course they have enrolled on.
I want to run a query which shows all courses and how many delegates are booked on each. If I use both tables and perform a count of delegates with the same course ID, the query only shows those courses for which there is someone booked on. In other words, if there is a course with no bookings, it doesn't appear on the query.
I'd like this:
Basic Hygene 27/01/2002 4 delegates
Basic Hygene 30/01/2002 0 delegates
Basic Hygene 02/02/2002 3 delegates
...instead of this:
Basic Hygene 27/01/2002 4 delegates
Basic Hygene 02/02/2002 3 delegates