Add missing group_by condition
Prevent some errors on WAMP servers