S4 Term 2 | ICT: Query Design – Tutor Lesson Plan | 45-minute flow, teaching script, common errors, practice with answers
- 2026-12-01
Lesson prep guide · S4 Term 2 ICT
Students submit a query without counting its rows, so writing OR for AND goes unnoticed. This lesson uses eight loan records to show three criteria giving two, four and seven rows, and makes the row count the check.
01 Prior knowledge check (first 3 minutes)
If any item below fails, fix it first, or this lesson stalls:
| Skill | Quick check | Pass standard |
|---|---|---|
| Reading a table | How many of the 8 records are in 3A | Three |
| Comparing | Which values meet 4 or more | Five and four both do |
| Totals | 40 books over 8 records | A mean of 5.0 |
02 Lesson flow (45 minutes)
| Time | Stage | Tutor does | Student does |
|---|---|---|---|
| 0–6 min | Opening: a query handed in unchecked | Show a query with no row check and ask how to tell | Suggest one check |
| 6–18 min | Four kinds of operator | Equals, not equal, BETWEEN 3 and 5, and LIKE prefixes | Write one of each and report the rows |
| 18–28 min | AND against OR | 3A and 4 or more gives two rows, 3A or 4 or more gives seven | Predict before running |
| 28–37 min | Sorting | Descending starts 9, 7, 6 | Sort once themselves |
| 37–42 min | Verifying with totals | 40 books, mean 5.0, fines 37, groups 11, 13, 16 | Add the subtotals |
| 42–45 min | Exit check | Collect three answers and sort operator, order and check errors | Work without notes |
03 Teaching script (read it aloud)
Act one: a criterion must be runnable
Students restate: text takes quotes and numbers do not, and the row count is checked first.
Act two: AND binds before OR
Students restate: AND binds first, and brackets change the order.
Act three: verify with totals and groups
Students restate: the subtotals must add to the total, or the criterion is wrong.
04 Question types and steps
| Type | Example | Steps | Answer |
|---|---|---|---|
| Equals and not equal | Class equals 3A | Quotes for text, none for numbers | Three rows in 3A and 5 outside |
| Range | Books from 3 to 5 | BETWEEN includes both ends | 4 rows: S01, S04, S06 and S08 |
| AND and OR | 3A and 4 or more books | AND binds first, brackets change it | Two rows, or 7 with OR |
| Sorting | 8 book counts | ORDER BY with DESC and a second key | 9 down to 2 |
One table, three criteria, three answers. The first needs class and book count together, so only S01 and S04 remain; the second keeps any row passing either test, four in all; writing OR instead of AND pulls the whole of 3A in and gives seven. Always count the rows afterwards: eight records, 40 books, a mean of 5.0 and 37 in fines, with class totals of 11, 13 and 16.
05 Three independent practice questions
| Question | Answer | What to observe |
|---|---|---|
| Write the criterion for class 3A with four or more books and give the row count. | Class equals 3A AND Books at least 4, returning 2 rows, S01 and S04 | Watch for missing quotes or OR instead of AND |
| Write the criterion for three to five books inclusive and give the row count. | BETWEEN 3 AND 5, returning 4 rows | Watch for dropping the inclusive ends |
| Do the subtotals 11, 13 and 16 agree with the total of 40? | They add to 40, so the query is consistent; any gap means a wrong criterion or group | Watch whether they actually add the numbers |
06 Common errors and correction lines
| Error | Student usually writes | Tutor says |
|---|---|---|
| Text without quotes | WHERE Class = 3A | “3A is text, so it needs quotes; otherwise the system reads a field name.” |
| AND and OR mixed up | Class = “3A” OR Books at least 4 | “OR gives seven rows; AND, or brackets, gives the two you want.” |
| No row check | “It ran, so it must be right” | “Count the rows, then match 40 and the subtotals 11, 13 and 16.” |
| Wrong sort direction | ORDER BY Books | “Highest first needs DESC, or the list runs low to high.” |
07 Homework (paper and question numbers)
- S3 ICT paper, section E, question 17: name the fields and choose the key Question 17 uses the school library table with StudentID, Class, Books and Fine, the same fields
- S3 ICT paper, section E, question 18: the criterion for 3A with four or more books The answer is Class equals 3A AND Books at least 4, giving S01 and S04, two records, as in acts one and two
- S5 ICT paper, question 1, part 1: WHERE, ORDER BY DESC and LIMIT for the top three Part 1 combines criteria, sorting and limiting, which suits stronger students
08 Exit check (last 3 minutes)
| Question | Answer | Verdict |
|---|---|---|
| Why do text criteria need quotes? | Without them the text is read as a field name | Habit means the reason is missing |
| Which binds first, AND or OR? | AND, and brackets change the order | Left to right means act two again |
| How many rows for 3A and four or more, and for 3A or four or more? | 2 and 7 | Equal numbers mean the distinction is lost |
09 Tutor FAQ
Which year is this page for?
S4 Term 2, the database query unit of local secondary ICT; S5 adds subqueries and parameter queries.
Is 45 minutes enough for four operator types?
Yes: twelve minutes on operators, ten on AND and OR, nine on sorting, and the rest on verification and the exit check.
Is there a matching worksheet?
Yes. The homework links to questions 17 and 18 of section E in the S3 ICT paper, where the answer to question 18 is two records.
Find a tutor freeTutor sign-up →
©2026 TutorZone · www.tutorzone.com.hk · Terms of use · All rights reserved. Original TutorZone material for personal study and teaching only; not for resale or republication.



