Search code examples
time-seriesapache-iotdb

How to group different devices in Apache IoTDB in different data groups and sor the data in ascending order?


I have multiple devices in Apache IoTDB, naming like root.maas.CPEC01.CY-PL1.P9AE-C2G1C01-00ACEQPTSTUS.2 or root.maas.OR01.LFPEC.M2AE-R3G2C01-00ACEOPTSTUS.2. How can I group different device into different groups and sort the time series in ascending order by time in Apache IoTDB?


Solution

  • Try SELECT EquipmentStatusID FROM root.maas.**.**.**.ACEQPTSTUS.** order by device, time asc ALIGN BY DEVICE in Apache IoTDB. Just remember to use device as the first sort key.