SELECT "ID_TagData", value
INTO avg_id, val
FROM "SC_Tag"."T_TagData"
WHERE "F_TagName_ID" = 192
AND "F_Date">(now()- interval '12:00:00')
ORDER BY "F_Date" DESC LIMIT 1;
SELECT "ID_TagData", value
FROM "SC_Tag"."T_TagData"
WHERE "F_TagName_ID" = 192
AND "F_Date">(now()- interval '12:00:00')
ORDER BY "F_Date" DESC LIMIT 1
INTO avg_id, val;