SELECT resources.resourcename "License Name", Max(softwarelist.softwarename) "Managed Software", slt.licensetype "License Type", Max(softwarelicenses.licensekey) "License Key", softwarelicenses.installationscount "No of CALs", MAX(swmfg.NAME) "Manufacturer", sdorganization.name "Site", softwarelicenses.allocated "Allocated", slf.UDF_CHAR1 "Entity", slf.UDF_CHAR2 "Location", SystemInfo.WORKSTATIONNAME "Workstation", MAX(aaaUser.FIRST_NAME) AS "User", aaacontact.EMAILID AS "E-Mail" FROM softwarelist LEFT JOIN softwareinfo ON softwarelist.softwareid = softwareinfo.softwareid LEFT JOIN swinstallationkeyinfo ON softwareinfo.softwareinfoid = swinstallationkeyinfo.softwareinfoid LEFT JOIN componentdefinitionsoftware ON softwarelist.softwareid = componentdefinitionsoftware.softwareid LEFT JOIN resources ON componentdefinitionsoftware.componentid = resources.componentid LEFT JOIN softwarelicenses ON resources.resourceid = softwarelicenses.resourceid LEFT join RESOURCELOCATION on softwarelicenses.RESOURCEID=RESOURCELOCATION.RESOURCEID LEFT JOIN sitedefinition on RESOURCELOCATION.siteid=sitedefinition.siteid left join sdorganization on sitedefinition.siteid=sdorganization.org_id LEFT JOIN SoftwareManufacturer swmfg ON SoftwareList.SWMANUFACTURERID=swmfg.SWMANUFACTURERID LEFT JOIN Softwarelicensetypes slt ON softwarelicenses.licensetypeid=slt.licensetypeid LEFT JOIN Systeminfo ON SoftwareInfo.WORKSTATIONID=SystemInfo.WORKSTATIONID LEFT JOIN Resources resource ON Systeminfo.WORKSTATIONID=resource.RESOURCEID LEFT JOIN ResourceOwner rOwner ON resource.RESOURCEID=rOwner.RESOURCEID LEFT JOIN ResourceAssociation rToAsset ON rOwner.RESOURCEOWNERID=rToAsset.RESOURCEOWNERID LEFT JOIN SDUser sdUser ON rOwner.USERID=sdUser.USERID LEFT JOIN AaaUser aaaUser ON sdUser.USERID=aaaUser.USER_ID LEFT JOIN AaaUserContactInfo aaausercontact ON aaauser.USER_ID=aaausercontact.USER_ID LEFT JOIN AaaContactInfo aaacontact ON aaausercontact.CONTACTINFO_ID=aaacontact.CONTACTINFO_ID LEFT JOIN ci ci1 ON ci1.ciid=sdUser.ciid LEFT JOIN baseelement be1 ON be1.ciid=ci1.ciid LEFT JOIN people p1 ON p1.ciid=be1.ciid
LEFT JOIN requester ON requester.ciid=p1.ciid LEFT JOIN softwarelicense_fields slf ON softwarelicenses.resourceid=slf.licenseid GROUP BY resources.resourcename,sdorganization.name, slt.licensetype, softwarelicenses.allocated, softwarelicenses.installationscount, aaacontact.EMAILID, SystemInfo.WORKSTATIONNAME, slf.UDF_CHAR1, slf.UDF_CHAR2 ORDER BY 1
Note: Additional fields have been added considering the 1st two fields with single line text fields. You may also modify the alias names present here as per your requirement.