SELECT resource.resourcename "License Name",
Max(softwarelist.softwarename) "Software_Name",
Max(resource.acquisitiondate) "Acquisition Date",
Max(resource.expirydate) "Expiry Date",
Max(swinstallationkeyinfo.productid) "Software_ID",
Max(swinstallationkeyinfo.productkey) "Software_Key" FROM softwareinfo
LEFT JOIN softwarelist
ON softwareinfo.softwareid = softwarelist.softwareid
LEFT JOIN swinstallationkeyinfo
ON softwareinfo.softwareinfoid =
swinstallationkeyinfo.softwareinfoid
LEFT JOIN componentdefinitionsoftware
ON softwarelist.softwareid =
componentdefinitionsoftware.softwareid
LEFT JOIN resources resource
ON componentdefinitionsoftware.componentid = Resource.componentid
LEFT JOIN softwarelicenses
ON Resource.resourceid = softwarelicenses.resourceid
GROUP BY resource.resourcename
ORDER BY 1