A database table called SoftDrinks stores details of the soft drinks sold by a small shop. [Table with Field and Example data: Name=Cola, Supplier=Cambridge Beverages, Container=Can, SizeCl=330, NumberInStock=30, ReorderLevel=15, Reordered=Yes]
- (a)State whether any of the given fields would be suitable as a primary key and give a reason for your answer.[1]
- (b)Complete the structured query language (SQL) statement to return the number of cans the shop has in stock. SELECT ... FROM ... WHERE ... ;[5]
Mark scheme
Marking points from the official mark scheme (May/June 2024). The mark or mark type is shown in brackets.
- [1] (a) One mark for an appropriate reason if no has been stated, for example: None of the fields are likely to contain unique data.
- [5] (b) One mark for each correct answer SUM NumberInStock SoftDrinks Container 'Can' Correct code: SELECT SUM (NumberInStock) FROM SoftDrinks WHERE Container = 'Can';
Write your answer and get it marked
On Oracle Prep you can write or photograph your own answer and have it marked by AI against this mark scheme, with feedback on what you missed.
Sign up free →