G
Guest
I have spent hours trying to select a count.
I have a table with 3 of the ten columns containing a
student id, a year and a school id. I am trying to
create a report that will list each school, year, and
count of student ids.
example: there could be 10 records with school ID = 1,
year = 2003 and studenid = 123....what is different with
each of these records is a course id, dates, etc.
I am trying to set a query up using new query with sql
specific to code select statement .....i would need
distinct on all 3 fields with a count of distinct student
IDs..if am trying nesting in selects.
SELECT count(studentID), schoolID, year
FROM
(select distinct (studentID), schoolID, year from
( select studentID, distinct (schoolID), year from
(select studentID, schoolID, distinct (year) from
tblStudentCourseAndGrades));
Any help appreciated.
I have a table with 3 of the ten columns containing a
student id, a year and a school id. I am trying to
create a report that will list each school, year, and
count of student ids.
example: there could be 10 records with school ID = 1,
year = 2003 and studenid = 123....what is different with
each of these records is a course id, dates, etc.
I am trying to set a query up using new query with sql
specific to code select statement .....i would need
distinct on all 3 fields with a count of distinct student
IDs..if am trying nesting in selects.
SELECT count(studentID), schoolID, year
FROM
(select distinct (studentID), schoolID, year from
( select studentID, distinct (schoolID), year from
(select studentID, schoolID, distinct (year) from
tblStudentCourseAndGrades));
Any help appreciated.