I trying to find a way to get the most recent row for each serie in a measurement.
for example:
Assuming the series in results
measurement are:
> select series from test_result
results,service=MyService,team=A
result,service=MyService,team=B
test_result,service=MyService,team=C
and the rows in a given time frame are:
> select * from test_result order by time desc
time service team status duration
---- ------- ---- ------ --------
1523370939000000000 MyService A 1 300
1523370940000000000 MyService B 1 300
1523370941000000000 MyService A 1 300
1523370941000000000 MyService C 1 300
1523371748000000000 MyService A 1 300
1523371749000000000 MyService B 1 300
1523371750000000000 MyService B 1 300
1523371754000000000 MyService A 1 300
I would expect the query to return the first, second and fourth rows. Any help is much appreciated.
Thanks!