I would like to filter the below table based on the week column, but only when the year week combination is a max.
In the below example I want my output to only select rows with year 2022 and week 1 as that is the latest year week combination.
I am thinking to use a row number over partition by but did not have any success.
Car colour year week
aaa red 2021 52
aaa black 2021 51
bbb red 2022 1
bbb yellow 2022 1