1 個回答
- 最新
- 最多得票
- 最多評論
0
To answer my own question:
One way to do this is with a following type of query:
-- Get data points for both CO2 and humidity
SELECT
time,
MAX(if(measure_name = 'CO2', measure_value::double)) AS CO2_ppm,
MAX(if(measure_name = 'humidity', measure_value::double)) AS humidity_percent
FROM "MyTimestreamDB"."myTable"
WHERE
time >= ago(10m)
AND measure_name IN ('CO2', 'humidity')
AND deviceId='6a087171-400c-4851-a82b-ceab383b421c'
GROUP BY time
ORDER BY time DESC
已回答 3 年前
相關內容
- AWS 官方已更新 2 年前
- AWS 官方已更新 1 年前