Question: Aggregate Records Using COUNT
Learn how to use the COUNT function to aggregate records in a table using SQL query.
We'll cover the following...
Question
Given the following StudentGrades
table structure:
StudentGrades
RecordID | StudentID | StudentName | Subject | Marks |
1 | st-101 | Alexa | Mathematics | 90.00 |
2 | st-101 | Alexa | Science | NULL |
3 | st-102 | Diana | Mathematics | 80.00 |
4 | st-102 | Diana | Science | 88.00 |
5 | st-103 | Carl | Mathematics | NULL |
6 | st-103 | Carl | Science | 92.00 |
7 | st-104 | Sara | Mathematics | 75.00 |
8 | st-104 | Sara | Science | 85.00 |
9 | st-105 | Karen | Mathematics | 85.00 |
10 | st-105 | Karen | Science | 90.00 |
...