It's seem to be a simple task, but I can't figure it out.
I want to create table with a item name and it's related triggers' lastchange value, I've tried using the functions table to relate my query but it results 0 rows. What am I doing wrong?
I want to create table with a item name and it's related triggers' lastchange value, I've tried using the functions table to relate my query but it results 0 rows. What am I doing wrong?
Code:
SELECT t1.name as "Arquivo", to_timestamp(t3.lastchange) AT TIME ZONE '-3' as "HorĂ¡rio de Recebimento" from (SELECT itemid, name from items where name like 'HorĂ¡rio%' and hostid = 10084) t1 join (SELECT triggerid, itemid from functions) t2 on t1.itemid = t2.itemid join (SELECT triggerid, lastchange from triggers) t3 on t2.triggerid = t3.triggerid