👉🏻FAST AND EASY TO UNDERSTAND SOLUTION || MySQL
IntuitionApproachComplexity
Time complexity:

Space complexity:
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```mysql []
# Write your MySQL query statement below
WITH cte AS(SELECT *, MIN(year) OVER(PARTITION BY product_id) as min_year
            FROM Sales)
SELECT product_id, min_year as first_year, quantity, price
FROM cte
WHERE min_year = year
```
['Database', 'MySQL']