Past questions › sample-q22a
2025 2 marks SQL Programming for the Web (Year 12) SQL (GROUP BY)
NESA HSC Software Engineering Sample Examination + Marking Guidelines (official, 2025)
A table Students(StudentID, FirstName, Surname, Attended, Level) tracks students at a coding club (12 rows; levels Beginner, Intermediate, Expert). Complete the SQL query to generate the number of students at each level: SELECT Level, ??? FROM Students ??? BY Level;
Marking criteria
2: Correctly completes the SQL query. 1: Correctly selects at least TWO correct options.
Sample answer
SELECT Level, COUNT(StudentID) FROM Students GROUP BY Level;