Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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.)

Step by Step Solution

3.40 Rating (153 Votes )

There are 3 Steps involved in it

Step: 1

1 For creating table syntax is CREATE TABLE table name col1 datatype PK col2 datatype col3 datatype ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Global Marketing management

Authors: Masaaki Kotabe, Kristiaan Helsen

5th edition

470505745, 978-0470505748

More Books

Students also viewed these Accounting questions

Question

What was the influence of the strength of the treatment?

Answered: 1 week ago