Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. with inactive_nodes AS (SELECT certname FROM certnames WHERE (deactivated IS NOT NULL OR expired IS NOT NULL))
  2. SELECT pi.name AS package_name, pi.version AS version, count(*) count
  3. FROM package_inventory pi LEFT JOIN certnames ON pi.certname_id = certnames.id
  4. WHERE ((pi.name ~ 'vim' AND pi.name IS NOT NULL)
  5. AND NOT ((certnames.certname) in (SELECT inactive_nodes.certname AS certname FROM inactive_nodes)))
  6. GROUP BY pi.name, pi.version ORDER BY pi.name, pi.version limit 100;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement