WITH
t1 AS (SELECT data_value from logs.tag_log l where tag_id=1 AND data_value IS NOT NULLORDER BY logtime DESC limit 1),
t2 AS (SELECT data_value from logs.tag_log l where tag_id=2 AND data_value IS NOT NULLORDER BY logtime DESC limit 1),
t3 AS (SELECT data_value from logs.tag_log l where tag_id=3 AND data_value IS NOT NULLORDER BY logtime DESC limit 1),
t4 AS (SELECT data_value from logs.tag_log l where tag_id=4 AND data_value IS NOT NULLORDER BY logtime DESC limit 1)
SELECT t1.data_value data1, t2.data_value data2, t3.data_value data3, t4.data_value data4 FROM t1, t2, t3, t4 ;
:{${6}, ${7} , ${8}, ${9}}:
bu sorguyu çalıştıramadım.