Added groupByQuery test.