S6 ICT Databases and SQL, Paper 4: filtering, sorting and updating a Book table
Paper 4 uses five Book rows priced 45, 88, 30, 120 and 60 to count 5, keep three rows above 50, average 68.6, total stock 28, find one out-of-stock row, sort 30 first, spread 90, keep three rows between 45 and 90, raise B2 stock to 2 by UPDATE and repair a missing DESC.
| 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 | 5 | COUNT(*) counts rows, so five rows return 5. |
| 2 | 3 rows | The books priced 88, 120 and 60 pass, while 45 and 30 do not. |
| 3 | 68.6 | The five prices add to 343, and dividing by 5 gives 68.6. |
| 4 | 28 | Adding 12, 0, 5, 3 and 8 gives 28. |
| 5 | 1 row | Only the second book has zero stock while the others still hold copies. |
| 6 | 30 | Without DESC the order is ascending, so the cheapest price of 30 comes first. |
| 7 | 90 | The highest price is 120 and the lowest 30, so the difference is 90. |
| 8 | 3 rows | The prices 45, 88 and 60 fit the range, while 120 is too high and 30 too low. |
| 9 | 2 | The WHERE clause touches only row B2, so 0 plus 2 gives 2 and other books stay unchanged. |
| 10 | Ascending (ASC); DESC is needed for most expensive first | ORDER BY defaults to ascending order, so descending needs an explicit DESC. |
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.

