Skip to content

Instantly share code, notes, and snippets.

@jfrantz1-r7
Created October 3, 2018 14:16
Show Gist options
  • Save jfrantz1-r7/8eabe44a112afea39ee821e1709f051b to your computer and use it in GitHub Desktop.
Save jfrantz1-r7/8eabe44a112afea39ee821e1709f051b to your computer and use it in GitHub Desktop.
SELECT count(da.asset_id) as asset_count, ds.vendor, ds.name as software_name, ds.family, ds.version
FROM dim_asset_software das
JOIN dim_software ds using (software_id)
JOIN dim_asset da on da.asset_id = das.asset_id
GROUP BY ds.vendor, ds.name, ds.family, ds.version, ds.cpe
ORDER BY asset_count DESC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment