🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: SQL for Data Analysis: all 9 questions

Quiz: SQL for Data Analysis · Question 1 of 9

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

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

  1. A.The total amount of returned orders
  2. B.The number of returned orders
  3. C.The number of all orders
  4. D.The percentage of returned orders
Answer & explanation

Correct answer: The number of returned orders

Each returned row adds 1 and every other row adds 0.

Can you get the rest right without peeking?

Take the timed Quiz: SQL for Data Analysis quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →