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 SQL stand for, and what is it primarily used for?

In this round
  1. What does SQL stand for, and what is it primarily used for?
  2. ``` SELECT department, AVG(salary) FROM employees GROUP BY department; ``` What does this query return?
  3. What does `SELECT * FROM t` do?
  4. What does `LEFT JOIN orders o ON o.user_id = u.id` return for users with no orders?
  5. Which clause filters AGGREGATED groups, not individual rows?
  6. What is the practical difference between `DELETE FROM t` and `TRUNCATE TABLE t`?
  7. What does a `PRIMARY KEY` constraint guarantee?
  8. How do you limit a result to the first 10 rows in standard SQL (and PostgreSQL/MySQL/SQLite)?
  9. What does `INNER JOIN` return?
  10. What is the difference between `COUNT(*)` and `COUNT(col)`?
  11. ``` SELECT u.name, o.id FROM users u JOIN orders o ON o.user_id = u.id; ``` Which type of join is this (implicit / explicit)?
  12. What does a `UNIQUE` constraint provide that `PRIMARY KEY` does not (and vice versa)?
Gaps to close?
Read the curated Sql notes — core concepts, patterns, interview prep.
Sql notes

More quizzes

AccessibilityAlgorithmsAngularApache KafkaAWSBootstrap