/en-tutor-prep-s6-ict-database-sql-practice-3/
/en-tutor-prep-s6-ict-database-sql-practice-3/
英文版
3
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

S6 ICT Databases and SQL, Paper 3: grouping, distinct values and precedence

S6 ICT Databases and SQL, Paper 3: grouping, distinct values and precedence

  • 2026-11-03

S6 ICT Databases and SQL, Paper 3: grouping, distinct values and precedence

Paper 3 uses six Student rows marked 78, 92, 65, 88, 54 and 73 to count 6, keep four rows above 70, average 75, total 450 and a spread of 38, then sorts 92 first, finds four rows between 60 and 90, groups two classes, keeps three distinct cities and repairs an OR with AND.

Reminders GROUP BY returns one row per group, DISTINCT removes duplicates, and AND binds tighter than OR.

01 Paper details (check answers afterwards)

Item Detail
Questions 10
Suggested time 25
Difficulty mix Foundation 4 · Intermediate 3 · Challenge 2 · Error redo 1
Chapter Chapter: S6 ICT: Databases and SQL
Level S6

02 Questions (10 items)

  1. FoundationTable Student holds 6 rows. What does `SELECT COUNT(*) FROM Student;` return?
  2. FoundationMarks are 78, 92, 65, 88, 54 and 73. How many rows does `WHERE Mark > 70` return?
  3. FoundationFor the same marks, what does `SELECT AVG(Mark) FROM Student;` return?
  4. FoundationFor the same marks, what does `SELECT SUM(Mark) FROM Student;` return?
  5. IntermediateFor the same marks, what does `SELECT MAX(Mark) – MIN(Mark) FROM Student;` return?
  6. IntermediateIn `SELECT Name FROM Student ORDER BY Mark DESC;`, whose mark appears first?
  7. IntermediateFor the same marks, how many rows does `WHERE Mark BETWEEN 60 AND 90` return?
  8. ChallengeClasses are 3A, 3B, 3A, 3B, 3A, 3B. How many rows does `SELECT Class, COUNT(*) FROM Student GROUP BY Class;` return?
  9. ChallengeCities are HK, KLN, HK, NT, KLN and HK. How many rows does `SELECT DISTINCT City FROM Student;` return?
  10. Error redoError repair: `WHERE Class = “3A” OR Class = “3B” AND Mark > 80` returns 5 rows but the student expected 2. Why?

03 Answers and one-line notes

# Answer One-line note
1 6 COUNT(*) counts rows, so six rows return 6.
2 4 rows The marks 78, 92, 88 and 73 pass, while 65 and 54 fail.
3 75 The six marks add to 450, and dividing by 6 gives 75.
4 450 Adding 78, 92, 65, 88, 54 and 73 gives 450.
5 38 The highest is 92 and the lowest 54, so the difference is 38.
6 The 92 mark DESC sorts from largest to smallest, so the 92 mark comes first.
7 4 rows The marks inside the range are 78, 65, 88 and 73, while 92 and 54 fall outside.
8 2 rows (3A has 3, 3B has 3) GROUP BY folds equal classes into one group, so two classes give two rows, each counting 3.
9 3 rows DISTINCT removes duplicates, leaving just HK, KLN and NT, three different cities.
10 AND binds tighter than OR, so brackets are needed to get 2 rows The AND part is evaluated first and then joined by OR, so brackets are needed to get the two high marks.

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.

Book an S6 ICT tutorTutor 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 →