I’m trying to get the lastest value from a series for all available fields in a measurement.
This is the schema we have currently:
measurement, tag1, tag2, tag3, field1 time
measurement, tag1, tag2, tag3, field2 time
measurement, tag1, tag2, tag3, field3 time
Query that I am currently trying is:
Select Last(field1), Last(field2), Last(field3)
From measurement
Group by *
This query is pretty fast and returns the latest results correctly but I can’t find a way to also include a latest timestamp with result for each field.
Expected output of query I want is:
Filed1_value time, Field2_value time, …
Is it possible to get this result without using multiple queries or do I need to change my schema somehow, thanks.