MySQL beat 99.58%
select 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)
select 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)
[]