S6 ICT Databases and SQL, Paper 1: SELECT, WHERE and aggregates
Paper 1 uses a four-row Student table to cover WHERE filtering, primary key rules, COUNT returning 4 and ORDER BY DESC, then two rows above 80, an average of 80.75, a sum of 323, a range of 27 and Lee first after sorting.
| 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 |
| # | Answer | One-line note |
|---|---|---|
| 1 | WHERE | WHERE tests each row, and only the rows that pass the test appear in the result. |
| 2 | Unique for every row and never empty | A primary key identifies each row, so its value must not repeat and must not be left empty. |
| 3 | 4 | COUNT(*) counts rows, so four rows return 4 regardless of the column contents. |
| 4 | ORDER BY Score DESC | ORDER BY sorts the rows and DESC means largest first, while ASC is smallest first. |
| 5 | 2 rows | Only Lee at 92 and Ho at 88 are above 80, while Chan at 78 and Wong at 65 fail the test. |
| 6 | 80.75 | The four scores add to 323 and dividing by 4 gives 80.75. |
| 7 | 323 | SUM adds the four scores, and 78 plus 92 plus 65 plus 88 is 323. |
| 8 | 27 | The highest is 92 and the lowest 65, so the difference, the range, is 27. |
| 9 | Lee | Only Lee at 92 and Ho at 88 qualify, and sorted high to low Lee comes first. |
| 10 | The clause order is wrong; WHERE must come before ORDER BY | SQL filters with WHERE before it sorts with ORDER BY, so swapping them is a syntax error. |
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.

