I am trying to complete an sql query to show how many GCSEs a student has on record.]
*STUDENT *SUBJECT *SCHOOL
ABB13778 | English | Social Care & Early Years
ABB13778 | Information and Communication Technology | Social Care & Early Years
ABB13778 | Mathematics | Social Care & Early Years
ABB13778 | Media Studies | Social Care & Early Years
For example this student should recieve a count of 4 as there is 4 distinct subjects assigned to the school and student ID.
I can count the items but the output should be by school and number(see below), and I am not sure how toy form a case to create this
NUM OF STUDENT with each amount of GCSE
SCHOOL 1 2 3 4 5 6 7 8 9 10 11
Social Care & Early Years | 5 1 2 7 0 1 13 15 8 4 2
Built Environment |
Business & Computing |
This is probably simpler than I am thinking but at the minute I cant get my head around it. Any help would be greatly appreciated.