Skip to content
Advertisement

Select max date per year

I have the table as follows:

And I’d like to select the max date for every year per user, so the result would be like:

Some help? Thank you!

Advertisement

Answer

Just use aggregation:

If you have more columns that you want, then use distinct on:

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement