Exam 5: SQL

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

VEHICLE Observe the table VEHICLE that contains the following four records: VEHICLE Vehiclell 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. -Show the INSERT INTO statements for the table VEHICLE.

Free
(Essay)
4.8/5
(24)
Correct Answer:
Verified

INSERT INTO vehicle VALUES ('111','Car' ,'Ford' ,'O1','Pam');
INSERT INTO vehicle VALUES ('222','Car' ,'Ford' ,'O2','Pat');
INSERT INTO vehicle VALUES ('333','Truck','Honda','O3','Pam');
INSERT INTO vehicle VALUES ('444','Car' ,'Honda','O1','Pam');

What is the purpose of the DELETE command in SQL?

Free
(Essay)
4.8/5
(29)
Correct Answer:
Verified

The DELETE command in SQL is used for deleting the data stored in database relations.

What is the purpose of a ";" (semicolon)in the SQL statement?

Free
(Essay)
4.9/5
(39)
Correct Answer:
Verified

A semicolon ";" following the end of an SQL statement indicates the end of the SQL command.In a list of multiple SQL statements,the semicolon indicates where each SQL statement ends.

HAPPY INSURANCE Observe the HAPPY INSURANCE DATABASE: CLIENT ClientID ClientName CientAgent ClientSpouseName C111 Tom A1 Jenny C222 Kain A1 Bill C333 Cole A2 Amy C444 Dorothy A2 C555 Anay A3 Amy C666 Tina A3 Madt C777 Christina A4 Mike AGENT AgentID AgentName AgentArea AgentRating AgentYearofHire SupervisedBy A1 Kate 1 101 1990 A2 Amy 2 92 2009 Al A3 Luke 3 100 1992 A4 James 3 90 2010 A3 AREA ArealD AreaName AreaHQ 1 East Boston 2 West San Francisco 3 Central Chicago This database will be used for the following questions citing tables from the HAPPY INSURANCE database. -Write an SQL query for the HAPPY INSURANCE database that will,for each area where the highest rated agent has a rating higher than 100,display the area ID,area name,and average rating for all agents in the area.

(Essay)
4.7/5
(37)

VEHICLE Observe the table VEHICLE that contains the following four records: VEHICLE Vehiclell 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. -Write the SQL query on the table VEHICLE that lists for each owner the OwnerID,OwnerName,and the number of vehicles each owner owns,sorted by the number of vehicles each owner owns (in ascending order. )

(Essay)
4.8/5
(29)

HAPPY INSURANCE Observe the HAPPY INSURANCE DATABASE: CLIENT ClientID ClientName CientAgent ClientSpouseName C111 Tom A1 Jenny C222 Kain A1 Bill C333 Cole A2 Amy C444 Dorothy A2 C555 Anay A3 Amy C666 Tina A3 Madt C777 Christina A4 Mike AGENT AgentID AgentName AgentArea AgentRating AgentYearofHire SupervisedBy A1 Kate 1 101 1990 A2 Amy 2 92 2009 Al A3 Luke 3 100 1992 A4 James 3 90 2010 A3 AREA ArealD AreaName AreaHQ 1 East Boston 2 West San Francisco 3 Central Chicago This database will be used for the following questions citing tables from the HAPPY INSURANCE database. -Write an SQL query for the HAPPY INSURANCE database that shows the client ID for each client whose spouse's name is the same as the name of an agent.

(Essay)
4.8/5
(33)

What is the purpose of the ALTER TABLE command?

(Essay)
4.9/5
(39)

STUDENT Observe the table STUDENT: STUDENT StudentID SSN Nane Class D111 111-11-1111 Connor Freshman D222 222-22-2121 Trevor Freshman D333 333-33-3333 Connor Sophomore D444 444-44-4444 Parker Sophomore D555 555-55-5555 Connor Sophomore This table will be used for the following questions citing table STUDENT. -What will be the result of the following query on table STUDENT? SELECT * from STUDENT;

(Multiple Choice)
4.9/5
(41)

VEHICLE Observe the table VEHICLE that contains the following four records: VEHICLE VehiclelD Type Make OwnerID OwnerName 111 Car Ford O1 Pam 222 Car Ford O2 Pat 333 Thuck Honda O3 Pan 444 Car Honda O1 Pan This table will be used for the following questions citing table VEHICLE. -The following query on table VEHICLE will return 4 values: SELECT make FROM vehicle;

(True/False)
4.8/5
(40)

When is the IS NULL comparison used?

(Essay)
4.9/5
(27)

HAPPY INSURANCE Observe the HAPPY INSURANCE DATABASE: CLIENT ClientID ClientName CientAgent ClientSpouseName C111 Tom A1 Jenny C222 Kain A1 Bill C333 Cole A2 Amy C444 Dorothy A2 C555 Anay A3 Amy C666 Tina A3 Madt C777 Christina A4 Mike AGENT AgentID AgentName AgentArea AgentRating AgentYearofHire SupervisedBy A1 Kate 1 101 1990 A2 Amy 2 92 2009 Al A3 Luke 3 100 1992 A4 James 3 90 2010 A3 AREA ArealD AreaName AreaHQ 1 East Boston 2 West San Francisco 3 Central Chicago This database will be used for the following questions citing tables from the HAPPY INSURANCE database. -Show the CREATE TABLE statements for the table AGENT (assume that non-primary key columns can be optional. )

(Essay)
4.9/5
(35)

What is a view?

(Essay)
4.9/5
(32)

What is an outer query?

(Essay)
4.9/5
(47)

VEHICLE Observe the table VEHICLE that contains the following four records: VEHICLE VehiclelD Type Make OwnerID OwnerName 111 Car Ford O1 Pam 222 Car Ford O2 Pat 333 Thuck Honda O3 Pan 444 Car Honda O1 Pan This table will be used for the following questions citing table VEHICLE. -The following query on table VEHICLE will return 2 values: SELECT DISTINCT ownerid,ownername FROM vehicle;

(True/False)
4.9/5
(28)

STUDENT Observe the table STUDENT: STUDENT StudentID SSN Nane Cass D111 111-11-1111 Connor Freshman D222 222-22-2121 Trevor Freshman D333 333-33-3333 Connor Sophomore D444 444-44-4444 Parker Sophomore D555 555-55-5555 Connor Sophomore This table will be used for the following questions citing table STUDENT. -Show the CREATE TABLE statements for the table STUDENT (assume that non-primary keys are optional. )

(Essay)
4.8/5
(42)

HAPPY INSURANCE Observe the HAPPY INSURANCE DATABASE: CLIENT ClientID ClientName CientAgent ClientSpouseName C111 Tom A1 Jenny C222 Kain A1 Bill C333 Cole A2 Amy C444 Dorothy A2 C555 Anay A3 Amy C666 Tina A3 Matt C777 Christina A4 Mike AGENT AgentID AgentName AgentArea AgentRating AgentYearofHire SupervisedBy A1 Kate 1 101 1990 A2 Amy 2 92 2009 Al A3 Luke 3 100 1992 A4 James 3 90 2010 A3 AREA ArealD AreaName AreaHQ 1 East Boston 2 West San Francisco 3 Central Chicago This database will be used for the following questions citing tables from the HAPPY INSURANCE database. -What will be retrieved by the following query on the table CLIENT? SELECT DISTINCT clientname FROM client WHERE clientspousename = 'Amy';

(Multiple Choice)
4.9/5
(35)

What is the purpose of the ORDER BY keyword?

(Essay)
4.8/5
(27)

When are two sets of columns union compatible?

(Essay)
4.9/5
(31)

VEHICLE Observe the table VEHICLE that contains the following four records: VEHICLE Vehiclell 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. -Write the SQL query on the table VEHICLE that lists once the owner ID and owner name of each owner.

(Essay)
4.9/5
(37)

What is the purpose of the GROUP BY keyword?

(Essay)
4.8/5
(37)
Showing 1 - 20 of 100
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)