DISTINCT and COUNT together?

kate10123

Registered User.
Local time
Today, 20:41
Joined
Jul 31, 2008
Messages
185
Hi there,

I am trying to write a query to count the number of distinct students that belong to each faculty and a gender breakdown of this.

My query is as follows:

Code:
SELECT distinct Count(tbl_Tutorial.StudentID) AS CountOfStudentID, tbl_Student.Faculty, tbl_Student.M_F
FROM tbl_Student INNER JOIN tbl_Tutorial ON tbl_Student.StudentID = tbl_Tutorial.StudentID
GROUP BY tbl_Student.Faculty, tbl_Student.M_F;

The problem is, the count is not working with DISTINCT.

Any ideas how I can reformat the query?

Thanks :)
 
split it into two queries, one for the count, then use that as the recordsource in another query to use the DISTINCT Clause
 

Users who are viewing this thread

Back
Top Bottom