InfluxDB 1.8 query help (show all values with same timestamp, and specific tag)

i got following data structure:


So each 12-16 min i send data to the influxDB with informations about several hosts.

I need to create a query, that counts all different “tag2” for each “tag1” (group by) and only for the last saved timestamp.

Can anyone help?

has no one any idea? :slight_smile:

This method should solve your problem