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:
The problem is, the count is not working with DISTINCT.
Any ideas how I can reformat the query?
Thanks
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
