Question from the SQL - Fundamentals test

Write a SQL query to get the total sales quantity for each product.

Easy

Given the following 'sales' table:

| sale_id | product_id | sale_date  | quantity |
|---------|------------|------------|----------|
| 1       | 1          | 2023-01-01 | 5        |
| 2       | 2          | 2023-01-02 | 8        |
| 3       | 1          | 2023-01-03 | 3        |

What SQL query allows you to retrieve the total number of items sold for each product ?

Author: JOHANStatus: Published(Update)Question passed 95 times
Edit
3
Community EvaluationsNo one has reviewed this question yet, be the first!