Your question is Top Products SQL Query. Start with the requirements and the one table on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Saint-Gobain's commercial analytics team wants to identify the products with the highest sales volume. Using the product_sales table, write a PostgreSQL query that ranks products by the total number of units sold.
product_name and calculate total units sold with SUM.| Column | Type | Description |
|---|---|---|
| sale_idPK | INT | Unique sales record identifier |
| product_name | VARCHAR(100) | Saint-Gobain product name |
| quantity | INT | Units sold in the sales record |
| sale_date | DATE | Date of the sale |