Lesson Plan

Lesson Plan
Grade: Date: 17/01/2026
Subject: Computer Science
Lesson Topic: Read, understand and complete SQL scripts to query data
Learning Objective/s:
  • Describe the purpose of key SQL clauses (SELECT, WHERE, ORDER BY, GROUP BY, HAVING, JOIN).
  • Interpret each part of a given SQL script and explain its function.
  • Complete missing elements in SQL queries accurately using correct syntax.
  • Write basic SELECT statements that incorporate filters, joins, grouping, and ordering.
  • Identify common errors in SQL scripts and correct them.
Materials Needed:
  • Projector and screen for demonstration.
  • Student laptops or computer lab PCs with a SQL IDE (e.g., MySQL Workbench).
  • Printed worksheets containing the sample database schema and fill‑in‑the‑blank scripts.
  • SQL cheat‑sheet handout summarising SELECT, WHERE, JOIN, GROUP BY, HAVING, ORDER BY.
  • Teacher‑prepared sample database (Students, Courses, Enrollments) loaded on the server.
  • Answer key for teacher reference.
Introduction:

Start with a quick discussion on how businesses retrieve specific information from large databases. Ask students to recall the basic SELECT statement they have used previously. Explain that today they will sharpen their ability to read, interpret, and complete SQL scripts, and by the end they will be able to write correct queries that filter, join, and aggregate data.

Lesson Structure:
  1. Do‑now (5 min): Short quiz on basic SELECT syntax displayed on the board.
  2. Mini‑lecture (10 min): Review core clauses (WHERE, ORDER BY, GROUP BY, HAVING, JOIN) using the sample schema.
  3. Guided practice (15 min): Teacher walks through the provided script, highlighting each clause and the purpose of the JOIN.
  4. Pair activity (20 min): Students complete the four fill‑in‑the‑blank queries on worksheets, checking against the cheat‑sheet.
  5. Check for understanding (5 min): Whole‑class poll or clicker questions on common pitfalls.
  6. Extension (optional 5 min): Write a query to list the highest mark per year group.
Conclusion:

Recap that students can now read, interpret, and finish SQL scripts involving joins and aggregation. For the exit ticket, each learner writes one correct WHERE clause and one HAVING clause on a sticky note. Assign homework: a set of additional SQL exercises focusing on LEFT JOIN and subqueries to reinforce today’s learning.