Quick Ref.
Functions
date
number
string
Data Types
date
number
string

Congestion Charging database

Graduated questions

ER diagram for the Congestion Charging database:

Entity relation diagram er5 camera(id, perim)
keeper(id, name, address)
vehicle(id, keeper)
image(camera, whn, reg)
permit(reg, sDate, chargeType)

Sample query

0a.
List the vehicles for which 'Strenuous, Sam' is the registered keeper.
The link between Keepers and Vehicles is via the foreign key specified in the CREATE TABLE vehicle statement. Note the line
 ,FOREIGN KEY(keeper) REFERENCES keeper(id) 
This will be the basis of our join condition.

Results