i have this sql table and i want to query the rows with max date if multiple ones exists with the same num if theres no multiple colomns just get the existing row for example on this table
Num | date |
---|---|
1 | 1990/01/01 |
1 | 2020/12/31 |
2 | 1990/01/01 |
2 | 2020/12/31 |
3 | Null |
the result should be :
Num | date |
---|---|
1 | 2020/12/31 |
2 | 2020/12/31 |
3 | Null |