Is it possible to query a certain measuring point based on time, and if there is no such point, then take the nearest one in Apache IoTDB? What I want to query out is a specific value at a certain time. If no value is matched, then take the latest value. I wonder how should I write my sql statement using the last function?

1

There are 1 best solutions below

0
On BEST ANSWER

Try select last status, temperature from root.ln.wf01.wt01 where time <= 2017-11-07T23:50:00. This statement will let you know the nearest data point for the time you want in Apache IoTDB.