0

According to the query result align by device, can the query results of some devices be removed according to certain condition in Apache IoTDB? For example, I only want to query the data of fans 1-20 from hundreds of fans in total, and I cannot filter the data according to the fan numbers. I tried the following query statement, but the result still returns hundreds of data lines while I only want the first 20 lines.

Anyone know how to edit this statement?

select LAST_VALUE(heapId) as heapId,LAST_VALUE(bunchNo) as bunchNo,LAST_VALUE(no) as no, LAST_VALUE(voltage) as voltage,LAST_VALUE(temperature) as temperature,LAST_VALUE(soc) as soc,LAST_VALUE(soh) as soh from root.station01.cell.bms795717935384768512.bunch01.** where  no  > 0 and no <=20 align by device

1 Answers1

0
select LAST_VALUE(heapId) as heapId, LAST_VALUE(bunchNo) as bunchNo, LAST_VALUE(no) as no, LAST_VALUE(voltage) as voltage, LAST_VALUE(temperature) as temperature, LAST_VALUE(soc) as soc, LAST_VALUE(soh) as soh
from root.station01.cell.bms795717935384768512.bunch01.**
where no > 0 and no <= 20
having LAST_VALUE(heapId) is not null
align by device

Try this coding to see if Apache IoTDB can filter out the data rows with null values?