Medium🔥 | Easy Approach 2023🤝|| Explained 📝|| SQL50/25✅
Hello LeetCode fans,\nBelow I presented a solution to the problem (1070. Product Sales Analysis III).\nIf you found it useful or informative,\nClick the "UPVOTE
# Hello LeetCode fans,\nBelow I presented a solution to the problem (1070. Product Sales Analysis III).\nIf you found it `useful` or `informative`,\nClick the "`UPVOTE`" button below and it means I was able to `help someone.`\nYour UPVOTES encourage me and others who are `working hard` to improve their problem solving skills.\n# Code\n```\nSELECT PRODUCT_ID, YEAR \nAS FIRST_YEAR, QUANTITY, PRICE\n FROM (SELECT PRODUCT_ID,\n  YEAR, QUANTITY,PRICE, rank() OVER(\n   PARTITION BY PRODUCT_ID ORDER BY YEAR) RN\n    FROM SALES ) _rank WHERE _rank.RN=1  ORDER BY PRODUCT_ID\n```
['MySQL']