select dhw.host_name as 'Host',
def.name as 'Product',
def.sw_version_label as 'Version',
DATEADD(s, ds.creation_date, '19700101') as 'Installed On (GMT)'
from ca_discovered_hardware dhw
inner join ca_discovered_software ds on dhw.dis_hw_uuid=ds.asset_source_uuid
inner join ca_software_def def on ds.sw_def_uuid=def.sw_def_uuid
where ds.creation_date >= DATEDIFF(s, '19700101', GETUTCDATE()) - 604800
and ds.dis_source_type_id=1
and def.software_type_id=3
and dhw.creation_date <= DATEDIFF(s, '19700101', GETUTCDATE()) - 604800
order by dhw.host_name, def.name, def.sw_version_label, [Installed On (GMT)]