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

Q22 · 2210/22/M/J/25 Q9

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

Q222210/22/M/J/25original Q9Structured · 6 marks
Question 9 from 2210/22/M/J/25

Worked solution

(a)

Pick one field for each type:

Data typeField
BooleanSubway
integerPopulation (or Founded, Identification)
realAverageIncome
textName (or Country, Continent, Identification)

All four correct [2]

Note: two or three correct scores [1].

(b)

SELECT Name, Country, Population
FROM CapitalCity
WHERE Continent = "Asia";

All three correct fields in the SELECT [1]

Keyword FROM [1]

Correct field in WHERE: Continent [1]

Correct value: "Asia" (single quotes also fine) [1]

KEY IDEAMatch each field to the data it holds, then fill in SELECT, FROM and WHERE.
TOTAL 6 marks

Official mark scheme

Mark scheme for 2210/22/M/J/25 question 9
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.