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

Q7 · 2210/22/M/J/21 Q6

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

Q72210/22/M/J/21original Q6Structured · 5 marks
Question 6 from 2210/22/M/J/21

Worked solution

Errors

Compare the grid with what the question asks: price, name and number sold of small plants that do not flower.

Write any three of these errors:

The Table row is not completed (only NAME has PLANT). [1]

The POSITION column (or its criteria = "shade") is not needed. [1]

No criteria is set in the SIZE column (it should be = "small"). [1]

No criteria is set in the FLOWER column (it should be False).

Any three of these four errors score the three marks.

Corrected grid

SIZE and FLOWER are used only for the tests, so they are not ticked. POSITION can be left out.

SIZEPRICEFLOWERNUMBERSOLDNAME
TablePLANTPLANTPLANTPLANTPLANT
Sort
Showno tick✓no tick✓✓
Criteria="small"False
or

Rows Field, Table and Show correct [1]

Criteria row correct: small and False [1]

POSITION may stay in the grid, with its criteria removed and Show not ticked. The columns may be in any order.

KEY IDEAEvery column needs a table name, and each condition in the question needs its own criteria.
TOTAL 5 marks

Official mark scheme

Mark scheme for 2210/22/M/J/21 question 6
VIDEO
▶ Whole paper

Video solution of the whole paper · by CS BY AQIB KHAN. 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.