Answer it
P1 a3 canteen group by
5 marksYou mark it yourself against the marking points
A school canteen records every sale in a table, Sale.
| sale_id | item | quantity | sale_date |
|---|---|---|---|
| 1 | Wrap | 4 | 2026-10-19 |
| 2 | Soup | 3 | 2026-10-19 |
| 3 | Wrap | 5 | 2026-10-19 |
| 4 | Salad | 2 | 2026-10-20 |
| 5 | Soup | 6 | 2026-10-20 |
| 6 | Wrap | 3 | 2026-10-20 |
| 7 | Salad | 4 | 2026-10-21 |
| 8 | Soup | 2 | 2026-10-21 |
(a) Construct an SQL query that shows each item with the total quantity sold of it, but only for items whose total quantity is more than 10. [3]
(b) State the rows returned by this query. [2]
SELECT item, COUNT(*) FROM Sale WHERE quantity >= 3 GROUP BY item;
[5]