Question from the SQL - Fundamentals test

Write a SQL query to get the total order amount for each customer.

Easy

Given the following 'orders' table:

| order_id | customer_id | order_date | total_amount |
|----------|-------------|------------|--------------|
| 1        | 1           | 2023-01-01 | 100          |
| 2        | 2           | 2023-01-02 | 150          |
| 3        | 1           | 2023-01-03 | 200          |

Which SQL query retrieves the total order amount for each customer?

Author: Vincent CotroStatus: PublishedQuestion passed 1704 times
Edit
2
Community EvaluationsNo one has reviewed this question yet, be the first!