HELP
Question 1 (0.5 points)
(True/False). In an "ID" column with the data type INTEGER PRIMARY KEY, each value entered for the ID must be unique.
Question 1 options:
Question 2 (0.5 points)
What is the error in this SQL statement?
CREATE vehicletype (carid INTEGER PRIMARY KEY, typeofvehicle TEXT, manufacturer TEXT);
Question 2 options:
|
The CREATE command is incomplete
|
|
|
There are too many columns designated for the table.
|
Question 3 (0.5 points)
(True/False). Will this SQL statement create a table called vehicletype?
CREATE TABLE vehicletype (carid PRIMARY KEY, typeofvehicle TEXT, manufacturer TEXT);
Question 3 options:
Question 4 (0.5 points)
This command was used to create a table: CREATE TABLE vehicletype (carid INTEGER PRIMARY KEY, typeofvehicle TEXT, manufacturer TEXT);
Which of the following would correctly add a row of data to the table?
Question 4 options:
|
INSERT INTO vehicletype VALUES (1, truck, Chevrolet);
|
|
|
INSERT INTO vehicletype VALUES(1, “truck”, “Chevrolet”);
|
Question 5 (0.5 points)
(True/False). This command was used to create a table: CREATE TABLE vehicletype (carid INTEGER PRIMARY KEY, typeofvehicle TEXT, manufacturer TEXT); Will the following instruction add a row to the table? INSERT INTO vehicletype VALUES (1, SUV, Honda);
Question 5 options:
Question 6 (0.5 points)
This command was used to create a table: CREATE TABLE vehicletype (carid INTEGER PRIMARY KEY, typeofvehicle TEXT, manufacturer TEXT,year INTEGER);
At least 25 rows have been inserted with different types of vehicles (truck, sedan, SUV, sport) and manufacturer (Chevrolet, Ford, Toyota, etc.), and year the vehicle was manufactured. What would be the result of this command:
Select * FROM vehicletype WHERE typeofvehicle=”truck” ORDER BY year;
Question 6 options:
Question 7 (0.5 points)
This table has been created (Database Schema) and populated with values listed in RESULTS.
|
Database Schema vehicletype 10 rows Id (PK) INTEGER typeofvehicle TEXT manufacturer TEXT year INTEGER inventoryonhand INTEGER |
RESULTS
|
Which of the following commands would result in a value of 6 (six) being displayed?
Question 7 options:
|
SELECT MIN(inventoryonhand) FROM vehicletype;
|
|
|
SELECT MAX(inventoryonhand) FROM vehicletype;
|
Question 8 (0.5 points)
This table has been created (Database Schema) and populated with values listed in RESULTS.
|
Database Schema vehicletype 10 rows Id (PK) INTEGER typeofvehicle TEXT manufacturer TEXT year INTEGER inventoryonhand INTEGER |
RESULTS
|
Which of the following commands would result in a value of 2009 (two thousand nine) being displayed?
Question 8 options:
|
SELECT MIN(year) FROM vehicletype;
|
|
|
SELECT MAX(year) FROM vehicletype;
|
|
|
SELECT AVG(inventoryonhand) FROM vehicletype;
|
|
|
SELECT COUNT(YEAR) FROM vehicletype;
|
Question 9 (0.5 points)
Which of the following is NOT a valid aggregate function?
Question 9 options:
|
SELECT MAX(inventoryonhand) FROM vehicletype;
|
|
|
SELECT * MAX FROM vehicletype;
|
|
|
SELECT AVG(inventoryonhand) FROM vehicletype;
|
|
|
SELECT SUM(inventoryonhand) FROM vehicletype;
|
Question 10 (0.5 points)
Assuming that a table has been correctly constructed with the command CREATE TABLE vehicletype (carid INTEGER PRIMARY KEY, typeofvehicle TEXT, manufacturer TEXT,year INTEGER, inventoryonhand INTEGER); and populated with at least 25 rows, which of the following is a valid aggregate function:
Question 10 options:
|
SELECT SUM inventoryonhand FROM vehicletype;
|
|
|
SELECT MIN(year) FROM vehicletype;
|
|
|
SELECT MAX(inventoryonhand) FROM typeofvehicle;
|