It's seem to be a simple task, but I can't figure it out.
I want to create a table that contains a item name and the lastchange value of it's related trigger. I tried using the functions table to relate them, but my SQL Query return 0 rows. Can someone help?
This is my Query:
I want to create a table that contains a item name and the lastchange value of it's related trigger. I tried using the functions table to relate them, but my SQL Query return 0 rows. Can someone help?
This is my Query:
Code:
SELECT t1.name as "File", to_timestamp(t3.lastchange) AT TIME ZONE '-3' as "Time" 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