A query result starts with the relationship between tables
Unexpected duplicate rows appear and the student looks only at the last filter. Return to the source tables: which keys are defined and which relationship is used by the join?
Share the teaching schema and query in Meet. Students can explain the join, run an alternative in their own environment and compare the output with the starting data.
A small teaching relationship
| Table | Fields to discuss |
|---|---|
| students | id, name |
| enrolments | student_id, course_id |
Compare students.id with enrolments.student_id.
