I just put together this solution when writing this question, which seems to work
I do not think this works. Here I added two more groups (month = 4 and 5, respectively), which I would consider excellent, but the result is the same as month = 1 and 2:
WITH employees_paid (Month, Employee, PercentOfTotal) AS ( SELECT 1, 'Alice', 0.25 UNION ALL SELECT 1, 'Barbara', 0.65 UNION ALL SELECT 1, 'Claire', 0.1 UNION ALL SELECT 2, 'Alice', 0.25 UNION ALL SELECT 2, 'Barbara', 0.5 UNION ALL SELECT 2, 'Claire', 0.25 UNION ALL SELECT 3, 'Alice', 0.25 UNION ALL SELECT 3, 'Barbara', 0.65 UNION ALL SELECT 3, 'Claire', 0.1 UNION ALL SELECT 4, 'Barbara', 0.25 UNION ALL SELECT 4, 'Claire', 0.65 UNION ALL SELECT 4, 'Alice', 0.1 UNION ALL SELECT 5, 'Diana', 0.25 UNION ALL SELECT 5, 'Emma', 0.65 UNION ALL SELECT 5, 'Fiona', 0.1 ), temp_ids (Month) AS ( SELECT DISTINCT MIN(Month) FROM employees_paid GROUP BY PercentOfTotal ) SELECT EMP.Month, EMP.Employee, EMP.PercentOfTotal FROM employees_paid AS EMP INNER JOIN temp_ids AS IDS ON EMP.Month = IDS.Month GROUP BY EMP.Month, EMP.Employee, EMP.PercentOfTotal;