Theres very few cases where you shouldnt be doing a group by with aggregates instead. (window functions count here)