Programming, Alibaba Cloud, Database, Postgresql, Data Analytics.
timestamp -- 状态上传时间 ); create table sensor_stat2 ( sid int, -- 传感器ID state boolean, -- 传感器状态，true在线，false离线 crt_time timestamp -- 状态上传时间 ); 4. Recursive Query Use a recursive query to query the final state of the sensor efficiently. with recursive t as ( ( select sensor_stat as sensor_stat from