SQLQuokka
Start practicing
QuestionsLearnSandboxFeaturesRoadmapFAQ

Exam Attendance Grid

Unsolved

A school wants a complete attendance grid: one row for every combination of student and subject, showing how many times that student sat that subject's exam. Combinations with no attempts show 0. Write an SQL query that returns student_id, student_name, subject_name and attended_exams. Order the results by student_id, then subject_name.

SQL Query Editor (Ctrl+Enter to run)
0 characters · Valid
Canonical Solution Official

Official Solution is Hidden

Try solving the question with the schema explorer and hints first. When ready, reveal the verified canonical query and step-by-step logic breakdown.

Community Q&A & Discussion

Ask questions, share alternate queries, and explore solutions

0 comments
Asked By:
Classic pattern · not tied to a specific company

Submission History

Your recent query executions and answer checks

Execution Pipeline:
FROM students
Full source dataset
4 rows total
Ready. Type a query to see live execution.
Clause: Auto-Sync · AlaSQL Engine