← All topics
Quiz: SQL for Data Analysis: questions with answers
9 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. What does SUM(CASE WHEN status = 'returned' THEN 1 ELSE 0 END) compute?
- Q2. Why is COUNT(CASE WHEN x 5 THEN 1 ELSE 0 END) a bug?
- Q3. In the CASE-based pivot, how many CASE expressions do you need?
- Q4. Which operation turns columns back into rows?
- Q5. What does SUM(SUM(amount)) OVER () give in a query grouped by city?
- Q6. Revenue was 2000 in January and 2500 in February. What is the month-on-month growth?
- Q7. Why should a funnel use COUNT(DISTINCT userid)?
- Q8. The first month in a LAG-based growth query shows NULL. What does that mean?
- Q9. Which is a portable way to add a grand total row in any database?