1070. Solution of Product Sales Analysis III
\n\n# Approach\nDivide given problem into sub problems in first step have to print \n\' product id, year, quantity, and price for the first year\' so writed in 
\n\n# Approach\nDivide given problem into sub problems in *first step* have to print \n\' product id, year, quantity, and price for the first year\' so writed in select block then *STEP 2* user only want to get data from first year (min year) so write query for first year. then remember we have to filter data group wise for each product id so write like wise\n\n\n\n# Code\n```mysql []\n# Write your MySQL query statement below\nSELECT product_id,year AS first_year,quantity,price\nFROM Sales\nWHERE (product_id, year) IN\n (SELECT product_id,MIN(year)\nFROM Sales\n GROUP BY product_id);\n```
['Database', 'MySQL']