Approved

Find out of date software

-- Variables
-- $$Software_Name$$ - String - Name of out of date software you are looking for
-- $$Software_Version$$ - Latest version number. The query will return the software NOT running this version
-- Software list temp table
WITH software_temp AS (
SELECT DISTINCT
name,
MAX(version) AS version,
meta_hostname
FROM xdr_data
WHERE query_name = 'windows_programs'
Group BY
name, meta_hostname
)
SELECT
meta_hostname as hostname,
name AS Software_Title,
version
from software_temp
WHERE lower(name) LIKE lower('%$$Software_Name$$%')
AND version <> '$$Software_Version$$'
GROUP BY
name,meta_hostname, version
ORDER BY
meta_hostname

This query you will enter the software you want to check, enter the update version. All out of date version and machines will be listed