Teaching SQL joins to Class 12 with the attendance register and the fee register
Every year my Class 12 children memorise "INNER JOIN returns only matching rows" for the exam, write it perfectly, and understand nothing. This year I tried something different and it worked better than I expected, so I am sharing. I borrowed two real registers from the office: the attendance register (roll number, name) and the fee register (roll number, term, amount). I asked the children: "Who has paid fees, with…
- Diolch Anitha, this is tidy. I do something similar with the register and the dinner money list. The transferred student is a brilliant way to get to data quality. Small task for anyone reading: write the query that finds fee rows with no matching student. Answers below 😄
- Respected Anitha madam, this is wonderful. I am a maths teacher just starting Python and SQL with Class 9 and 10. May I use the fee register example in my class? Farhan appearing two times is a very good way to explain one-to-many. Thanking you.