All quizzes
Free quiz · 50 questions in the bank

Sql quiz

Test your Sql knowledge with a free interactive quiz — 50 questions with answers and explanations. No signup needed to play.

Question 1/12Score 0

What does `INSERT INTO users (email) VALUES ('a@b')` do?

In this round
  1. What does `INSERT INTO users (email) VALUES ('a@b')` do?
  2. ``` SELECT user_id, COUNT(*) AS orders FROM orders WHERE created_at >= '2026-01-01' GROUP BY user_id HAVING COUNT(*) > 5; ``` What does this return?
  3. What does `SELECT DISTINCT col FROM t` return?
  4. What is the purpose of a column alias (`SELECT total AS amount`)?
  5. What does a `FOREIGN KEY` constraint do?
  6. What does `WHERE country IN ('UA', 'PL', 'DE')` do?
  7. What does `LEFT JOIN orders o ON o.user_id = u.id` return for users with no orders?
  8. ``` SELECT department, AVG(salary) FROM employees GROUP BY department; ``` What does this query return?
  9. What is the practical difference between `DELETE FROM t` and `TRUNCATE TABLE t`?
  10. In `WHERE name LIKE 'A%'`, what does `%` mean?
  11. What does a `PRIMARY KEY` constraint guarantee?
  12. What does `INNER JOIN` return?
Gaps to close?
Read the curated Sql notes — core concepts, patterns, interview prep.
Sql notes

More quizzes

.NET.NET MAUIAbsintheAccessibilityActixActix Web