Skills101
← All practice quizzes

Quiz: SQL for Data Analysis

5 questions · new set on every retakeNo time limitPass: 60%+10 XP on first pass

The query patterns data analysts use every day — CASE inside SUM, turning rows into columns (pivot), share of total, month-wise trends, subtotals and a sign-up funnel — on one small orders table.

Log in to take the quiz

Free account · see your score, answers and explanations, earn XP

  1. Question 1

    What does SUM(CASE WHEN status = 'returned' THEN 1 ELSE 0 END) compute?

  2. Question 2

    Why is COUNT(CASE WHEN x > 5 THEN 1 ELSE 0 END) a bug?

  3. Question 3

    In the CASE-based pivot, how many CASE expressions do you need?

  4. Question 4

    Which operation turns columns back into rows?

  5. Question 5

    What does SUM(SUM(amount)) OVER () give in a query grouped by city?

🎯 Today’s placement challenge — 10 questions, no login. Can you score 10/10?Take today’s challenge →