Skip to content
Advertisement

How to use “Partition By” or “Max”?

I’ve the following table (my_data):


what is the best / smallest SQL statement to retrieve only the data related to the highest year and grouped by ‘X’ , like this:


Note that this result table will be used in a join.

Advertisement

Answer

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