>_
classes_more_than_5_students.sql
PostgreSQL 18.6
Not run yet

+ 5 hidden

Input
class_signup
signup_id  student_id  class_name
101        1           pottery
102        2           pottery
103        3           chess
104        4           pottery
105        2           chess
106        5           pottery
107        6           pottery
108        7           chess
109        8           drama
Expected
[{"class_name": "pottery"}]

Students 1, 2, 4, 5 and 6 signed up for pottery: exactly five, so it runs. chess has three students and drama one.