WorksheetsSQL intro
Total questions: 26
Worksheet time: 26mins
What does "SQL" stand for?
Structured Question Language
Structured Query Language
Simple Query Language
Simple Question Language
Which statement is used to extract data from a database?
Extract
Get
Open
Select
Using which word allows you to specify that more than one condition must be met in a query?
Also
And
Or
Where
Using which word allows you to specify that only one of a series of conditions needs to be met in a query filter?
And
Maybe
If
Or
Which statement allows us to add a record to a table?
Add To
Update To
Add Into
Insert Into
Less than 100?
>= 100
> 100
=< 100
< 100
Which character returns all the data found in a table?
%
#
*
/
Which word is missing from the following SQL statement?
Select * table_name
With
Where
From
And
How do we select all rows for the "Designer" table?
SELECT * FROM Designer
SELECT [All] FROM Designer
SELECT Designer.*
SELECT FROM Designer
How would we script a SQL query to select "Description" from the Item table?
SELECT Item.Description
EXTRACT Description FROM Item
SELECT Item FROM Description
SELECT Description FROM Item
Which query would return only the fields DesignerID and Designer?
SELECT * FROM Designers
SELECT DesignerID, Name FROM Designers
SELECT DesignerID AND Designer FROM Designers
SELECT DesignerID, Designer FROM Designers
With SQL how can I return all items in the Item table sorted from the lowest priced to the highest priced?
SELECT * FROM Items AND ORDER BY Price
SELECT * FROM Items ORDER BY Price
SELECT * FROM Items BY Price
SELECT * FROM ORDER items BY Price
Which SQL statement would add a record to the Designer table?
INSERT INTO Designer VALUES (1, 'SMI01', 'M Smith', 'mail@msmith.com', 01224123456)
INSERT VALUES ('SMI01', 'M Smith', 'mail@msmith.com', 01224123456') INTO Designer
INSERT ('SMI01', 'M Smith', 'mail@msmith.com', '01224123456') INTO Designer
INSERT Designer INTO VALUES (''SMI01', 'M Smith', 'mail@msmith.com', '01224123456')
I want to see all of the Helados in the Products table that have a Price greater than 10?
SELECT * FROM Products WHERE ProductName= 'Helado' AND Price > 10
SELECT * FROM Products WHERE ProductName= 'Helado' OR Price < 25
SELECT * FROM Products WHERE name= 'Helado' AND Price >= 10
SELECT * FROM Products WHERE Price > 10
What is each row in a database table also known as?
A table
A replica
A record
A field
What is each column in a database table also known as?
An entity
A replica
A record
A field
Greater than 100?
>= 100
>100
=< 100
< 100
Greater than or equal to 100?
>= 100
> 100
=< 100
< 100
The UPDATE SQL clause can _____________
update only one row at a time
update more than one row at a time
delete more than one row at a time
delete only one row at a time
Which of the queries is most likely to have produced this result?
ANSWER: SELECT id, name, year FROM movies WHERE year > 2010;
ANSWER: SELECT id, name, year FROM movies WHERE year < 2010;
ANSWER: SELECT * FROM movies WHERE year > 2010;
ANSWER: SELECT id, name, year FROM movies WHERE YEAR > 2010;
What is missing in this code? SELECT * FROM WHERE genre = ‘action’ ORDER BY year;
Missing an AND
Table name
Capitalize action
None of these
SQL query to find all the cities whose humidity is 95.
SELECT city WHERE humidity = 95
SELECT city FROM weather WHERE humidity = 95
SELECT humidity = 89 FROM weather
SELECT city FROM weather
In what order does SQL process the instructions?
FROM - SELECT - WHERE - ORDER BY
WHERE - FROM - SELECT - ORDER BY
SELECT - FROM - WHERE - ORDER BY
SELECT - FROM - ORDER By - WHERE
When creatinga table, each column name has both a ...
table name and a database
command and an argument
goal and a purpose
name and a data type
What data type is best for a date field? Example: 03/26/2021.
TEXT
VARCHAR
INTEGER
What is the correct format for the SUM statement?
SELECT AVG(column_name)
FROM table_name
SELECT SUM(table_name)
FROM column_name
SELECT SUM(column_name)
FROM table_name
SELECT (column_name)SUM
FROM table_name
