add groupBy for mysql