2210/22/O/N/20 question 7: worked solution (October/November 2020, paper 22)

Show as plain text

Cambridge O Level Computer Science 2210 · 9.4 Structured query language (SQL) Worked solution from the Databases Paper 2 Algorithms, Programming and Logic booklet, Part 2 of 2. Q4 2210/22/O/N/20 original Q7 Structured · 7 marks Worked solution (a) Count the rows (not the heading row): A01 to A05, S01 to S07, S20, S21, S22, S25 and T19. Write: 17 [1] (b) Write: Fieldname: PartNum [1] Reason: the data in this field is unique for each record. [1] (c) Show all four fields. Sort Cost from largest to smallest. Quantity < 10 is the only criteria. PartNum Description Cost Quantity Table AUDIOPARTS AUDIOPARTS AUDIOPARTS AUDIOPARTS Sort Descending Show ✓ ✓ ✓ ✓ Criteria <10 or All four fields and the table name AUDIOPARTS correct [1] Sort row: Descending under Cost [1] Show row: all four boxes ticked [1] Criteria: <10 under Quantity [1] KEY IDEA A primary key holds values that never repeat. TOTAL 7 marks Official mark scheme VIDEO ▶ Whole paper Video solution of the whole paper · by Quixotic Academy. Tap the picture to open it on YouTube.