SELECT
CASE WHEN t14.name IS NULL THEN 'n/a' ELSE t14.name END AS "Nombre",
CASE WHEN t14.location IS NULL THEN 'n/a' ELSE t14.location END AS "Dirección",
t0.name AS "Tipo", t0.version AS "Versión", ostype||' '||osversion AS "S.O.", MAX(t0.time) AS "Último pulso recibido",
CASE WHEN cast(to_char((now()-t0.time),'SSSS') as numeric)
(SELECT t0._message_ident FROM Prelude_CreateTime AS t0 WHERE t0._parent_type = 'H' AND t0.time > (now() - INTERVAL '2 DAY') GROUP BY 1 ORDER BY 1 LIMIT 1)
AND t0.time > (now() - INTERVAL '2 DAY') AND t0._message_ident = t6._message_ident
GROUP BY 1,4,5,6,7 ORDER BY 2 DESC
) AS t0
LEFT JOIN (SELECT * FROM Prelude_Heartbeat AS th WHERE _ident > (SELECT t0._message_ident FROM Prelude_CreateTime AS t0 WHERE t0._parent_type = 'H' AND t0.time > (now() - INTERVAL '2 DAY') GROUP BY 1 ORDER BY 1 LIMIT 1)) AS th
ON (th._ident = t0._message_ident)
LEFT JOIN (SELECT * FROM Prelude_Node AS t14 WHERE _message_ident > (SELECT t0._message_ident FROM Prelude_CreateTime AS t0 WHERE t0._parent_type = 'H' AND t0.time > (now() - INTERVAL '2 DAY') GROUP BY 1 ORDER BY 1 LIMIT 1)
AND t14._parent_type = 'H' AND t14._parent0_index = 1) AS t14
ON (t14._message_ident = t0._message_ident)
WHERE t0.analyzerid IS NOT NULL GROUP BY 1,2,3,4,5,7,8
e-REdING. Biblioteca de la Escuela Superior de Ingenieros de Sevilla.