✅Easiest Basic Sql Solution |4 Approaches| Beginner Level to Advance🏆
```sql
#Approach 1 :Subquery and Join
SELECT
    Sales.product_id, 
    SubSales.first_year,
    Sales.quantity,
    Sales.price
FROM
    Sales
JOIN
    (
        SELECT
            product_id,
            MIN(year) AS first_year
        FROM
            Sales
        GROUP BY
            product_id
    ) AS SubSales   #subtable 1
ON Sales.product_id = SubSales.product_id AND Sales.year = SubSales.first_year;
```

```sql

#Approach 2;  Using IN
SELECT product_id, year AS first_year, quantity, price
FROM Sales
WHERE (product_id, year) in (
    SELECT product_id, MIN(year) 
    FROM Sales
    GROUP BY product_id
)
```

```sql
#Approach 3: Cross Join
SELECT s.product_id, sub.min_year AS first_year, s.quantity, s.price
FROM Sales s
CROSS JOIN (
    SELECT product_id, MIN(year) AS min_year
    FROM Sales
    GROUP BY product_id
) AS sub
WHERE s.product_id = sub.product_id AND s.year = sub.min_year;
```

```sql
#Approach 4 : Using Except
SELECT product_id, year AS first_year, quantity, price
FROM Sales
EXCEPT
SELECT s1.product_id, s1.year, s1.quantity, s1.price
FROM Sales s1
JOIN Sales s2 ON s1.product_id = s2.product_id AND s1.year > s2.year;
['MySQL', 'MS SQL Server']