Question from the SQL - Fundamentals test

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

Archived

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        |

Which SQL query retrieves the total sales quantity for each product?

Author: Vincent CotroStatus: Archived(New question!)Question passed 1576 times
2
Community Evaluations
developer avatar
Ambiguous
JOHAN
21/05/2024
Ambigue entre le nombre de vente et la quantité de vente. 1 vente peut comporter 5 articles mais reste 1 vente.