+-------------+-------+
|Column Name |Type|+-------------+-------+
| sale_id | int || product_id | int ||year| int || quantity | int || price | int |+-------------+-------+
sale_id is the primarykeyof this table.
product_id is a foreignkeyto Product table.
Note that the price is per unit.
Table: Product
1
2
3
4
5
6
7
+--------------+---------+
|Column Name |Type|+--------------+---------+
| product_id | int || product_name | varchar |+--------------+---------+
product_id is the primarykeyof this table.
Write an SQL query that reports the total quantity sold for every product id.