Observe the table VEHICLE that contains the following four records. Examine the result set table listed below.
Question:
Observe the table VEHICLE that contains the following four records. Examine the result set table listed below. Use the Column Titles and Data as a guide to respond to the following requests and questions.
VEHICLE
VehicleID Type Make OwnerID OwnerName
111 Car Ford O1 Pam
222 Car Ford O2 Pat
333 Truck Honda O3 Pam
444 Car Honda O1 Pam
This table will be used for the following questions citing table VEHICLE.
1. Write and Show the CREATE TABLE statements for the table VEHICLE (assume that Vehicle ID is the primary key)
2. Write and Show the INSERT INTO statements for the table VEHICLE.
3. Write the SQL query on the table VEHICLE that lists the owner ID and owner name for each owner who owns a Ford vehicle or any type of truck.
4. Write the SQL query on the table VEHICLE that lists the owner ID and owner name for each owner who owns a Ford vehicle.
5. Write the SQL query on the table VEHICLE that lists for each owner the Owner ID, Owner Name, and the number of vehicles each owner owns, sorted by the number of vehicles each owner owns (in ascending order.)
Global Marketing management
ISBN: 978-0470505748
5th edition
Authors: Masaaki Kotabe, Kristiaan Helsen