Is the expected solution correct?
Shortened the second test case for displayability. Below is the table screenshot. \nExpected output of OJ is actually the minimum year of a product_id, with qua
Shortened the second test case for displayability. Below is the table screenshot. \nExpected output of OJ is actually the **minimum** year of a product_id, with quantity and price of the **first** row. That\'s obviously an outcome from query similar with \n```\nselect product_id, min(year), quantity, price \nfrom Sales \ngroup by product_id \n``` \nin which those ungrouped fields with mutiple values only shows the first row.\nIt hardly has anything to do with the discreption "product id, year, quantity, and price **for the first year** of every product sold."\n![image](https://assets.leetcode.com/users/hstangnatsh/image_1559483193.png)\n![image](https://assets.leetcode.com/users/hstangnatsh/image_1559483221.png)\nMy failed code was:\n```\nselect Sales.product_id as product_id, Sales.year as first_year, quantity, price\nfrom Sales, (select product_id as id, min(year) as my\nfrom Sales\ngroup by product_id) t\nwhere Sales.product_id=t.id and Sales.year=t.my\norder by product_id\n```
[]