Simple MySQL solution
\n# Code\n\nselect distinct product_id, year as first_year, quantity, price \nfrom Sales \nwhere ((product_id, year) in (select product_id, min(year) from sales
\n# Code\n```\nselect distinct product_id, year as first_year, quantity, price \nfrom Sales \nwhere ((product_id, year) in (select product_id, min(year) from sales group by product_id))\n```
['MySQL']