Question DB-SQL-0041
MediumWhat does this query return for the table below?
Table orders:
| id | customer | city | amount | status |
|---|---|---|---|---|
| 1 | Ravi | Pune | 1200 | shipped |
| 2 | Meena | Delhi | 800 | pending |
| 3 | Ravi | Pune | 450 | shipped |
| 4 | Kiran | Mumbai | 2000 | cancelled |
| 5 | Meena | Delhi | 1500 | shipped |
| 6 | Arjun | Pune | NULL | pending |
| 7 | Kiran | Mumbai | 700 | shipped |
SELECT customer FROM orders GROUP BY customer HAVING SUM(amount) > 2000 ORDER BY customer;
- A.
Kiran, Meena
- B.
Kiran, Meena, Ravi
- C.
Sign up free to see the answer and a step-by-step explanation.