Cambridge O Level Computer Science 2210 · 9.4 Structured query language (SQL)

Q11 · 2210/22/O/N/22 Q7

Worked solution from the Databases Paper 2 Algorithms, Programming and Logic booklet, Part 2 of 2.

Q112210/22/O/N/22original Q7Structured · 8 marks
Question 7 from 2210/22/O/N/22

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.

SubjectNameCandidates
Geography200
Geology80
History250
Mathematics350

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.

SubjectCodeSubjectNameCandidates
TableASSESSASSESSASSESS
SortDescending
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 IDEAMatch each field to the data type that suits its values: text for codes, number for counts.
TOTAL 8 marks

Official mark scheme

Mark scheme for 2210/22/O/N/22 question 7
VIDEO
▶ Topic lesson

A lesson on this topic · by Mr Bulmer's Learning Zone. 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.