Assume I have records like
id | team_id | date
1 1 2022
2 1 2021
3 1 2020
4 2 2022
5 2 2021
Desired record
id | team_id | date
1 1 2022
4 2 2022
I would like to get the most recent id per team. How can I achieve this?