Search⌘ K
AI Features

Question: Aggregate Records Using COUNT

Explore how to apply the SQL COUNT aggregate function to analyze student grades and determine which students missed exams. This lesson helps you practice writing queries that count records, enhancing your ability to solve attendance-related problems in SQL interviews.

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

Additional information

You are provided with a table named StudentGrades that contains the following columns: ...