SQL

Lesson 9 of 10

Quiz ยท 8 min

Quiz, SQL basics

Answer all ten questions, then press Check my answers. You need 70% to pass. If you do not pass, read the explanations and try again.

Question 1 of 10

Which query gives the title column of every row in books?

Question 2 of 10

Which WHERE clause finds the books of the genre Mystery?

Question 3 of 10

Which pattern matches every title that ends with ing?

Question 4 of 10

What does this query return?

SELECT title FROM books ORDER BY price DESC LIMIT 2;
Question 5 of 10

What does COUNT(*) give?

Question 6 of 10

What is the difference between WHERE and HAVING?

Question 7 of 10

You run SELECT genre, COUNT(*) FROM books GROUP BY genre; on a table with 4 genres. How many rows are in the result?

Question 8 of 10

A customer has no orders. Which join keeps this customer in the result, with NULL in the order columns?

Question 9 of 10

What happens if you run DELETE FROM books; with no WHERE clause?

Question 10 of 10

Which statements about a subquery are true? Choose all that apply.

Choose all answers that apply.

Answer every question to check.