Nested group by

After grouping by sum of salaries in each group, I need to get the maximum of sum of salaries among the groups. What I need to write?