Oracle PLSQL solution using 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 */\n\nSelect Q.product_id , Q.first_year , Q.quantity ,  Q.price from (\n\nSelect product_id , year first_year ,quantity ,price , rank() over(partition by product_id order by year ) rn \nfrom Sales\n\n) Q\n\nwhere Q.rn = 1 \n\n```
['Oracle']