/en-tutor-prep-s6-ict-database-sql-practice-4/
/en-tutor-prep-s6-ict-database-sql-practice-4/
英文版
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 4: filtering, sorting and updating a Book table

S6 ICT Databases and SQL, Paper 4: filtering, sorting and updating a Book table

  • 2026-11-03

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.

Reminders ORDER BY defaults to ascending, WHERE decides which rows change, and aggregates ignore NULL while COUNT(*) does not.

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 Book holds 5 rows. What does `SELECT COUNT(*) FROM Book;` return?
  2. FoundationPrices are 45, 88, 30, 120 and 60. How many rows does `WHERE Price > 50` return?
  3. FoundationFor the same prices, what does `SELECT AVG(Price) FROM Book;` return?
  4. FoundationStock values are 12, 0, 5, 3 and 8. What does `SELECT SUM(Stock) FROM Book;` return?
  5. IntermediateFor the same stock values, how many rows does `WHERE Stock = 0` return?
  6. IntermediateIn `SELECT Title FROM Book ORDER BY Price;`, which price appears first?
  7. IntermediateFor the same prices, what does `SELECT MAX(Price) – MIN(Price) FROM Book;` return?
  8. ChallengeHow many rows does `WHERE Price >= 45 AND Price <= 90` return?
  9. ChallengeBook B2 has 0 in stock. After `UPDATE Book SET Stock = Stock + 2 WHERE BookID = “B2”;`, what is its stock?
  10. Error redoError repair: a student expected `ORDER BY Price` to list the most expensive first. How does it actually sort?

03 Answers and one-line notes

# 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.

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 →