Remove "group by" in queries when not necessary

This removes the "group by" clause in InfluxDB queries when not
necessary. Without the "group by" clause, and by still using the "last"
aggregation function, only one result is returned by InfluxDB, resulting
in faster queries.

Change-Id: Icb5a809634e0b00680af1d2602fc2303928ee519
1 file changed