Product Sales Analysis – 2

Write an SQL query that reports the total quantity sold for every product id.   Input Table : sales sale_id product_id sale_year quantity price 20 80 2017 21 300 30 80 2018 23 400 40 13 2019 56 600   Output Table: product_id total_quantity 80 44 13 56   Explanation: product_id is Foreign Key and … Read more

Product Sales Analysis – 1

Write an SQL query that reports all product names of products in the “sales” table along with their selling year and price.   Input Table : sales sale_id product_id sale_year quantity price 20 80 2017 21 300 30 80 2018 23 400 40 13 2019 56 600   Input Table: product product_id product_name 80 Asus … Read more