SQL Database Filter, Sort, and Alias Essentials Quiz
A 50-question quiz focused on filtering rows, sorting results, and using aliases to improve query readability and control output.
Question 1
Which clause filters rows in a query?
Question 2
What does the operator <> mean?
Question 3
Which logical operator requires both conditions to be true?
Question 4
Filtering using LIKE 'A%' matches values that:
Question 5
What does BETWEEN 5 AND 10 include?
Question 6
Which rows appear?
SELECT * FROM users WHERE age >= 21;Question 7
Interpret this:
SELECT * FROM orders WHERE total < 100;Question 8
What does this match?
SELECT * FROM items WHERE name LIKE '%box';Question 9
What is returned?
SELECT * FROM employees WHERE dept = 'IT' AND active = 1;Question 10
Which rows appear?
SELECT * FROM sales WHERE region <> 'East';Question 11
Which clause sorts rows?
Question 12
Which keyword sorts lowest to highest?
Question 13
Which sorting is applied first when multiple columns are listed?
Question 14
Why sort results?
Question 15
Sorting text alphabetically uses:
Question 16
How are results sorted?
SELECT name FROM team ORDER BY name ASC;Question 17
Which list is returned?
SELECT id FROM logs ORDER BY timestamp DESC;Question 18
Interpret the order:
SELECT price FROM menu ORDER BY price, name;Question 19
How many rows are returned?
SELECT * FROM grades ORDER BY score DESC LIMIT 3;Question 20
Which name appears first?
SELECT name FROM users ORDER BY LENGTH(name) ASC;Question 21
How will these be sorted?
SELECT id FROM posts ORDER BY id DESC;Question 22
What order results?
SELECT city FROM addresses ORDER BY city;Question 23
Which keyword creates a column alias?
Question 24
Why use aliases?
Question 25
Which is a valid alias?
Question 26
Aliases help when:
Question 27
Aliases can rename:
Question 28
Column aliases apply:
Question 29
What is the output label?
SELECT name AS full_name FROM users;Question 30
What does this produce?
SELECT price * 1.1 AS adjusted_price FROM products;Question 31
What label appears?
SELECT UPPER(name) AS upper_name FROM contacts;Question 32
Interpret the alias:
SELECT id AS identifier FROM accounts;Question 33
Which column name is shown?
SELECT quantity * price AS revenue FROM sales;Question 34
Which alias is valid?
SELECT city AS town FROM addresses;Question 35
Which heading appears?
SELECT CONCAT(first, ' ', last) AS full_name FROM people;Question 36
Filtering with AND requires:
Question 37
Filtering with OR requires:
Question 38
Which phrase sorts descending?
Question 39
Using LIMIT with ORDER BY helps:
Question 40
Which pattern matches any three-character string starting with X?
Question 41
Which clause appears last logically?
Question 42
Filtering text often uses:
Question 43
Which operator negates a condition?
Question 44
What does ORDER BY name, age do?
Question 45
AS is important because it:
Question 46
Which operator supports flexible matching?
Question 47
Filtering numeric ranges can be simplified using:
Question 48
Which expression filters out all rows except those equal to 2023?
Question 49
Sorting by multiple columns is helpful when:
Question 50
Why combine filtering, sorting, and aliasing?
