Free sample · no account needed

Try 5 SQL questions

Pick an answer for each question, then check them all at once. You will see the correct answers and explanations.

Question 1 of 5 · CASE & Conditional Logic

What does ELSE do in a CASE expression?

Question 2 of 5 · Subqueries

Where can a subquery appear in a SELECT statement?

Question 3 of 5 · Aggregate Functions

What does this query return?

SELECT COUNT(*) FROM employees WHERE salary > (SELECT AVG(salary) FROM employees);
Question 4 of 5 · Subqueries

Which query returns orders with an amount greater than every order placed by customer 10?

SELECT * FROM orders WHERE amount > ALL (SELECT amount FROM orders WHERE customer_id = 10);