Influxdb 为每个标记返回测量中的最后一个()值

Influxdb 为每个标记返回测量中的最后一个()值,influxdb,Influxdb,我正在使用XDB在不同的位置存储天气数据。温度和风是场,位置在标记中。大约每分钟测量一次 1: INSERT measurement,location=new-york temp=32.1 wind=3.0 2016-11-26T00:00:00Z 2: INSERT measurement,location=seattle temp=42.0 wind=3.1 2016-11-26T00:00:53Z 3: INSERT measurement,location=new-york tem

我正在使用XDB在不同的位置存储天气数据。温度和风是场,位置在标记中。大约每分钟测量一次

1: INSERT measurement,location=new-york temp=32.1 wind=3.0  2016-11-26T00:00:00Z
2: INSERT measurement,location=seattle  temp=42.0 wind=3.1  2016-11-26T00:00:53Z
3: INSERT measurement,location=new-york temp=33.1 wind=1.2  2016-11-26T00:01:00Z
4: INSERT measurement,location=seattle  temp=43.0 wind=2.0  2016-11-26T00:01:53Z
我想查询返回每个位置的最新天气数据。此查询的结果应该是第3行和第4行。

这应该可以:

按位置从测量组中选择位置、最后一个(温度)