A Gentle Introduction to

SQL


Pick an engine:

Congestion Charging database: medium questions

6 List the owners (name and address) of Vehicles caught by camera 1 or 18 without duplication.

7 Show keepers (name and address) who have more than 5 vehicles.

8 For each vehicle show the number of current permits (suppose today is the 1st of Feb 2003). The list should include the vehicle.s registration and the number of permits. Current permits can be determined based on charge types, e.g. for weekly permit you can use the date after 24 Jan 2003 and before 02 Feb 2003.

9 Obtain a list of every vehicle passing camera 10 on 25th Feb 2003. Show the time, the registration and the name of the keeper if available.

10 List the keepers who have more than 4 vehicles and one of them must have more than 2 permits. The list should include the names and the number of vehicles.