lets say i have following sql-table
fruit | amount | date
-------------------------
apple | 2 | 2019
apple | 3 | 2018
apple | 2 |
peach | 2 |
peach | 3 | 2017
where i want to fill up the null values in the column date with the earliest date of each fruit, so that the date column consists no null values. The result should look like this:
fruit | amount | date
-------------------------
apple | 2 | 2019
apple | 3 | 2018
apple | 2 | 2018
peach | 2 | 2017
peach | 3 | 2017
Any ideas how to do this in sql?