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

Q21 · 2210/21/M/J/25 Q8

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

Q212210/21/M/J/25original Q8Structured · 7 marks
Question 8 from 2210/21/M/J/25

Worked solution

(a)(i)

Write: Boolean [1]

(ii)

There are only two possible values, Yes and No (true or false) [1]

(b)

Find the rows where the driver is A Patel and show three columns.

RouteIDDestinationTime
BC02The Fountain9:10
BC08Sunset Quay12:01
BC27The University16:45

All three rows correct [2]

Note: one or two rows correct scores [1].

(c)

SELECT Destination
FROM BUS
WHERE Return = Yes;

SELECT Destination [1]

FROM BUS [1]

WHERE Return = Yes [1]

KEY IDEAA yes/no field is Boolean, and SELECT, FROM and WHERE each do one job.
TOTAL 7 marks

Official mark scheme

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