Revert "no need to select from select if no having statement"
!! this isnt true, grouping makes it a requirement

This reverts commit 4e04eeab9c3380cfbe4af33778e9abefe3df4286.