MySQL Solution
Apparently, the store can have different prices and quantities for the same product in a given year. \nThe problem does not explicitly mention this.\n\nWITH cte
Apparently, the store can have different prices and quantities for the same product in a given year. \nThe problem does not explicitly mention this.\n```\nWITH cte AS (\n\nSELECT\n    product_id,\n    MIN(year) as first_year\nFROM\n    sales\nGROUP BY\n    product_id\nORDER BY\n    product_id\n)\n\nSELECT\n    t1.product_id,\n    t1.year as "first_year",\n    t1.quantity,\n    t1.price\nFROM\n    sales t1\nINNER JOIN\n    cte t2\nON\n    t1.product_id = t2.product_id\nAND\n    t1.year = t2.first_year;\n    \n```
[]