ORACLE |  EASY SOLUTUION | USING WITH() | RANK()
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\n/* Write your PL/SQL query statement below */\nwith abc as \n(\n    SELECT product_id, year,  quantity, price, \n    RANK() OVER (PARTITION BY product_id ORDER BY year) AS rank\n    FROM sales\n    )\nselect a.product_id , a.year as first_year , a.quantity , a.price \nfrom abc  a\nwhere a.rank = 1;\n\n\n```
['Oracle']