wip: fix group by plans