Reordered group-by to match project reqs