What may cause the sql may be wrong
error when adding order by
to the Apache IoTDB query? My query statement is
select CY1, CY3
from root.*.line_id.17.machine.id.1715
where timestamp<1660268809952 order by timestamp limit 1
How should I correct my statement?
Try
order by time desc
instead oforder by timestamp
. You can also directly useorder by time
grammar in Apache IoTDB for other time-related scenarios.