wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

SQL Reboot Quiz

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.
What does SQL stand for?
a)
Structured Query Language
b)
Sequential Query Logic
c)
Standard Query List
d)
Scripting Quick Language
2.
Which clause is used to retrieve data from a table?
a)
INSERT
b)
WHERE
c)
SELECT
d)
CREATE
3.

You want to select all columns from the table People. Fill in the blank: SELECT (a)   FROM People

4.
Which clause filters rows based on conditions?
a)
ORDER BY
b)
WHERE
c)
FROM
d)
GROUP BY
5.
What does SELECT DISTINCT do?
a)
Sorts the data
b)
Removes duplicates
c)
Filters rows
d)
Adds new columns
6.

You want to rename the column name as first_name. Fill in the blank: SELECT name (a)   first_name FROM People

7.
Which operator is used for pattern matching in SQL?
a)
IN
b)
AND
c)
LIKE
d)
SUM
8.
What does ORDER BY number_of_children DESC do?
a)
Filters out rows with NULL values
b)
Sorts rows from fewest to most children
c)
Sorts rows from most to fewest children
d)
Groups people by number of children
9.

SELECT * FROM People WHERE name IN ("Louis", "David") — this returns rows where the name is either ______ or ______.

(a)  

10.
Which clause is used to group data before aggregation?
a)
JOIN
b)
GROUP BY
c)
HAVING
d)
SORT
11.
Which function counts all rows in a table?
a)
COUNTIF
b)
COUNT(*)
c)
SUM
d)
MAX
12.

SELECT SUM(spend) FROM purchases — this returns the (a)   of all spend values.

13.
What is the main difference between WHERE and HAVING?
a)
HAVING is used after aggregation
b)
WHERE is faster
c)
They are the same
d)
WHERE is for joins
14.
Which type of JOIN keeps only matching rows from both tables?
a)
LEFT JOIN
b)
RIGHT JOIN
c)
FULL OUTER JOIN
d)
INNER JOIN
15.

SELECT SUM(stock_value) OVER (PARTITION BY model_type) — this uses a (a)   function.