Quick-Fire Quiz
Test yourself.
Let's finish the interview section with a quick fire quiz. Five questions. Pause before each answer, and say it out loud, just like in a real interview.

- Five questions
- Pause before each answer
- Say it out loud
Question 1
Question one. Which clause runs first, when SQL processes a query? Pause and choose. The answer is C. From runs first, to pick the tables. Select runs much later, which is why you can't use a select alias in where.
Question 2
Question two. A table has one hundred rows, and the email column has ten nulls. What does count of email return? Pause and choose. The answer is B, ninety. Count of a column skips nulls.
Question 3
Question three. Which function gives tied values the same number, and leaves no gaps after them? Pause and choose. The answer is D, dense rank. Rank would leave a gap.
Question 4
Question four. What does an index mainly speed up? Pause and choose. The answer is A. Indexes speed up finding rows, with where and join. They actually make inserts a little slower.
Question 5
Last one. You run update books, set price equals ten, and forget the where clause. What happens? Pause and choose. The answer is C. Every book now costs ten dollars. That's why we always write the where first.
Summary
How did you do? If you got four or five, you're ready for SQL interviews. Next, the errors you'll see, and how to fix them fast.
Key takeaways- Execution order
- COUNT and NULLs
- Ranks, indexes, WHERE