change "group" attribute into an array.
changed format of select & aggregate response
added interface for grouping by multiple fields