Page 1 sur 1

Liste des logiciels avec leurs version, et les postes associé

Publié : 24 mai 2019 - 12:09
par sfonteneau

Code : Tout sélectionner

select
  n.normalized_name,s.version,string_agg(distinct lower(h.computer_name),' '),count(distinct h.uuid)
from hostsoftwares s
left join normalization n on (n.original_name = s.name) and (n.key = s.key)
left join hosts h on h.uuid = s.host_id
where (n.normalized_name is not null) and (n.normalized_name<>'') and not n.windows_update and not n.banned and (last_seen_on::date > (current_timestamp - interval '3 week')::date)
group by 1,2