SQL Fundamentals Quiz

10:00

SELECT, JOINs and aggregation. · 10 questions

Question 1 of 10
Which clause filters groups after aggregation?
Question 2 of 10
Which JOIN returns all rows from the left table?
Question 3 of 10
What does `COUNT(*)` count?
Question 4 of 10
Which keyword removes duplicate rows?
Question 5 of 10
Which is best for storing money in MySQL?
Question 6 of 10
What does this return?
SELECT COALESCE(NULL, 0, 5);
Question 7 of 10
What does this query return?
SELECT name FROM staff
ORDER BY salary DESC
LIMIT 3 OFFSET 2;
Question 8 of 10
In MySQL 8, how does `TRUNCATE TABLE orders` differ from `DELETE FROM orders`?
Question 9 of 10
Why does this query fail?
SELECT name FROM staff
WHERE salary > AVG(salary);
Question 10 of 10
Why do customers with no orders disappear from this result?
SELECT c.name, o.id
FROM customers c
LEFT JOIN orders o ON o.customer_id = c.id
WHERE o.status = 'PAID';