Skip to content
ExamSpine

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_iditemquantitysale_date
1Wrap42026-10-19
2Soup32026-10-19
3Wrap52026-10-19
4Salad22026-10-20
5Soup62026-10-20
6Wrap32026-10-20
7Salad42026-10-21
8Soup22026-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]