2210/22/O/N/22 question 7: worked solution (October/November 2022, 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. Q11 2210/22/O/N/22 original Q7 Structured · 8 marks Worked solution (a)(i) Write: SubjectCode: Text (it has letters) Exams: Number (both answers must be right for the mark). [1] (a)(ii) Write: a Boolean field can have only two values , but Candidates has many different values. [1] (b) Practicals < 1 means Practicals is 0: Mathematics, Geography, History and Geology. Show SubjectName and Candidates, sorted by SubjectName A to Z. SubjectName Candidates Geography 200 Geology 80 History 250 Mathematics 350 Correct data [1] Correct layout (SubjectName and Candidates only) [1] Correct order (ascending by name) [1] (c) Fewer than 150 means <150. Sort Candidates from largest to smallest. SubjectCode SubjectName Candidates Table ASSESS ASSESS ASSESS Sort Descending Show ✓ ✓ ✓ Criteria <150 or Correct field names and table names [1] Correct sort ( Descending on Candidates) and Show rows [1] Correct criteria: <150 [1] KEY IDEA Match each field to the data type that suits its values: text for codes, number for counts. TOTAL 8 marks Official mark scheme VIDEO ▶ Topic lesson A lesson on this topic · by Mr Bulmer's Learning Zone. Tap the picture to open it on YouTube.