Search for Java

Morning Gang,

How would I write out a query for searching for machines with Java 16 installed? When I attempt to do it in query builder, it shows me ALL the software on the asset

Something like this from Rapid7 works for me, just change the “ds.software_class” or ds.name within WHERE clause to generate java installed apps on endpoints.

SELECT
da.sites AS “Site_Name”,
da.ip_address AS “IP_Address”,
da.mac_address AS “MAC_Address”,
da.host_name AS “DNS_Hostname”,
ds.vendor AS “Vendor”,
ds.name AS “Software_Name”,
ds.family AS “Software_Family”,
ds.version AS “Software_Version”,
ds.software_class AS “Software_Class”
FROM
dim_asset_software das
JOIN
dim_software ds USING(software_id)
JOIN
dim_asset da ON da.asset_id = das.asset_id
WHERE
ds.software_class like’%’
AND
ds.name ilike ‘%Java%’
ORDER BY
ds.name ASC