End of Year Sale: Use Coupon Code END2025 to Get Extra 25% Off.
product_id and quantity columns from the Sales table.product_id to prepare for aggregation.SUM() function to calculate the total quantity sold for each product_id.total_quantity using the AS keyword.product_id and total_quantity.erDiagram
Sales {
int sale_id
int product_id
int year
int quantity
int price
}
Product {
int product_id
varchar product_name
}
Sales }|--|| Product : has