/en-tutor-prep-s3-ict-databases-sql-queries-practice-2/
/en-tutor-prep-s3-ict-databases-sql-queries-practice-2/
General Inquiry: info@TutorZone.com.hk
Office Hours: Monday to Saturday - 9:00 AM to 6:00 PM
WhatsApp Monday to Sunday - 24 hours
Hotline: +852 6828 1809
Instant Support: +852 9061 3106

Paper 2: Advanced: filters, LIKE and sorting

Paper 2: Advanced: filters, LIKE and sorting

  • 2026-11-21

Paper 2: Advanced: filters, LIKE and sorting

Chapter practice with ten items, answers and a one-line note for each, about 25 minutes.

Paper 2 Ten items on this chapter with answers for immediate marking.

01 Paper details (check answers afterwards)

Item Detail
Questions 10
Suggested time 25
Difficulty mix Foundation 4 · Intermediate 2 · Challenge 2 · Error redo 2
Chapter Chapter: S3 ICT: databases and SQL queries
Level Advanced

02 Questions (10 items)

  1. FoundationHow many rows does `SELECT COUNT(*) FROM students WHERE score >= 70;` return?
  2. FoundationHow many pupils does the condition `WHERE form IN (1, 3)` keep?
  3. FoundationHow many rows does `WHERE score BETWEEN 60 AND 85` return?
  4. FoundationHow many pupils does `WHERE name LIKE ‘%n’` match?
  5. IntermediateHow many pupils does `WHERE name LIKE ‘%a%’` match?
  6. IntermediateWhich pupil and score does `ORDER BY score DESC LIMIT 1` return?
  7. ChallengeWhich pupil and score does `ORDER BY score ASC LIMIT 1` return?
  8. ChallengeHow many groups does `SELECT form, COUNT(*) FROM students GROUP BY form;` return?
  9. Error redoHow many groups survive `GROUP BY form HAVING COUNT(*) >= 3`?
  10. Error redoCan `WHERE score = NULL` find the rows with no score?

03 Answers and one-line notes

# Answer One-line note
1 5 rows. Five pupils score 70 or above, so the other three are filtered out.
2 6 pupils. IN works like a list of OR tests: three in form 1 plus three in form 3.
3 4 rows. BETWEEN includes both ends, and four pupils fall inside that band.
4 3 pupils. The names ending in n are Ben, Dan and Finn.
5 5 pupils. Any name holding an a in any position counts, which gives five.
6 Gina with 95. DESC sorts from high to low and LIMIT 1 keeps only the first row.
7 Hugo with 50. ASC sorts from low to high, so the lowest score comes first.
8 3 groups. The table holds forms 1, 2 and 3, which produce three groups.
9 2 groups. Forms 1 and 3 hold three pupils each, and form 2 with two pupils is dropped.
10 No, comparisons against NULL need `IS NULL`. NULL means an unknown value, so every equals or not-equals test against it is false.

04 What to do after marking

  • After marking, redo only the wrong items and write down which step went wrong (formula, unit, or misread number).
  • Repeat the same item two days later; move to the next paper only when both attempts are correct.
  • Parents only need the answer and note columns; there is no need to explain every item.

Want the whole chapter? See all four difficulty papers on the chapter page.Tutor Registration →

Questions and answers are written originally by the TutorZone team and are not taken from any school, publisher or examination authority paper. Every value is checked by computer.

Join as a tutor or coach — academic, music, sports, arts, STEM. Free to register. See how it works →