I have the table below, and I am trying to return the 'GaltOwner', 'Month', and 'SUM(WAC)' that has the highest value in the 'SUM(WAC)' column for each 'GaltOwner' grouping. I'm having a hard time figuring out how to do this logically. The only way I can think of involves somehow placing the values in an array and iterating over it. Any insight is greatly appreciated! I've been stuck for a few hours now.
For example, the results from the table below should be: