Page 1 sur 1

Liste des logiciel normalisé avec nombre et liste de poste

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

Code : Tout sélectionner

select
  n.normalized_name,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