Code: Select all
SELECT h.uuid,h.computer_fqdn,install_date::date,version,h.listening_timestamp::timestamp,h.connected_users from hostsoftwares s
left join hosts h on h.uuid=s.host_id
where
s.key='WAPT_is1'
and
h.listening_timestamp<'20190115'
Code: Select all
SELECT h.uuid,h.computer_fqdn,install_date::date,version,h.listening_timestamp::timestamp,h.connected_users from hostsoftwares s
left join hosts h on h.uuid=s.host_id
where
s.key='WAPT_is1'
and
h.listening_timestamp<'20190115'
Code: Select all
SELECT h.uuid,h.computer_fqdn,install_date::date,version,h.last_seen_on::timestamp,h.connected_users from hostsoftwares s
left join hosts h on h.uuid=s.host_id
where
s.key='WAPT_is1'
and
h.last_seen_on<'20230101'
Code: Select all
h.last_seen_on<TO_CHAR(CURRENT_DATE - 45, 'yyyymmdd')