GroupsummaryQuery: adjust queries to fix ZF woes

Some less brackets also here. Dropping COALESCE as the subquery will
never return NULL

fixes #7303