Mike55
10-15-2004, 04:33 AM
Hi all
am attempting to do an inner select statement on a table, the table structure is as follows:
StudentID, Course_Name, Year
What i want to do is to count the no. of students on each course. The query must be setup in such a way that we get the course name from the table itself.
SELECT Distinct(Course_Name), Count(StudentID) as Population
FROM Details
where (course_Name) = (Select Distinct(Course_Name) From Details)
But this statement doesn't seem to work...any suggestions.
Mike55
am attempting to do an inner select statement on a table, the table structure is as follows:
StudentID, Course_Name, Year
What i want to do is to count the no. of students on each course. The query must be setup in such a way that we get the course name from the table itself.
SELECT Distinct(Course_Name), Count(StudentID) as Population
FROM Details
where (course_Name) = (Select Distinct(Course_Name) From Details)
But this statement doesn't seem to work...any suggestions.
Mike55