Question 1 Report
A school stores student club membership data in a table called CLUB_MEMBER.
| MembershipID | StudentName | ClubName | JoinDate | YearGroup | Active |
|---|---|---|---|---|---|
| CM01 | E. Owusu | Chess Club | 2023-09-05 | 10 | TRUE |
| CM02 | F. Nakamura | Drama Society | 2023-09-10 | 11 | TRUE |
| CM03 | G. Da Silva | Chess Club | 2023-09-05 | 10 | FALSE |
| CM04 | H. Khan | Coding Club | 2023-10-01 | 9 | TRUE |
| CM05 | E. Owusu | Coding Club | 2023-10-15 | 10 | TRUE |
| CM06 | J. Larsen | Drama Society | 2023-09-12 | 11 | TRUE |
| CM07 | F. Nakamura | Chess Club | 2024-01-10 | 11 | TRUE |
(a) Write an SQL query to find all clubs that student 'E. Owusu' has joined. [2]
(a) Finding all clubs that E. Owusu has joined: [2]
SELECT ClubName
FROM CLUB_MEMBER
WHERE StudentName = 'E. Owusu'[1] for SELECT ClubName, [1] for WHERE StudentName = 'E. Owusu'.
Expected result:
| ClubName |
|---|
| Chess Club |
| Coding Club |
E. Owusu appears in two records: CM01 (Chess Club) and CM05 (Coding Club). The query selects only the ClubName column rather than all columns, which is appropriate because the question asks specifically about clubs, not full membership details. Using SELECT * would also be accepted but would return extra information not asked for.
Everything you need to excel in your exams