← 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?
- A.The total amount of returned orders
- B.The number of returned orders
- C.The number of all orders
- 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 →