Week 8 tutorial
Week 8 tutorial
Using the above Hotel schema, determine whether the following queries are semantically correct.
WHERE h.hotelNo = b.hotelNo AND h.hotelNo = ‘H21’ AND b.roomNo = r.roomNo AND
3. Consider a relational data model for motor insurance policy management depicted below.
(a) Write an SQL statement to retrieve the first name and last name of all drivers who live in London
city.
(b) Write an SQL statement to list all policies which expire on 01/01/2017.
(c) Write an SQL statement to list all vehicles whose policy is worth more than ten thousand
pounds.
(d) Write an SQL statement to list the vehicle IDs owned for each driver licensed before 01/01/2009.