Worked solution from the Databases Paper 2 Algorithms, Programming and Logic booklet, Part 2 of 2.
Write: No, none of the fields would be suitable. None of the fields are likely to contain unique data (many drinks share a name, supplier, container or size) [1]
Add up NumberInStock, but only for rows where Container is Can.
SELECT SUM (NumberInStock) FROM SoftDrinks WHERE Container = 'Can';
SUM [1]
NumberInStock [1]
SoftDrinks [1]
Container [1]
'Can' [1]
▶ Whole paper
Video solution of the whole paper · by ZAINEMATICS. Tap the picture to open it on YouTube.
Solutions follow the official Cambridge mark schemes; marks are shown in grey. Videos are from other YouTube channels. Paper codes read component / series / year: M/J = May/June, O/N = October/November. Past-paper questions © UCLES, reproduced for classroom practice.