Report based on postgresssql on asset list *URGENT*

Report based on postgresssql on asset list *URGENT*

Hello,

I have the following report doien for me:
 

SELECT workstation.WORKSTATIONNAME "Workstation",

workstation.MANUFACTURER "Manufacturer",

osInfo.OSNAME "OS",

osInfo.VERSION "Version",

workstation.MODEL "Model",

workstation.SERVICETAG "Service Tag",

resource.SERIALNO "Serial Number",

osInfo.SYSTEMTYPE "System Type",

product.COMPONENTNAME "Product",

CASE WHEN CAST(compDefLaptop.ISLAPTOP AS CHAR(5)) IS NULL THEN 0 WHEN CAST(compDefLaptop.ISLAPTOP AS CHAR(5)) = '0' THEN 0 ELSE 1 END "Is Laptop",

workstation.LOGGEDUSER "Last Logged In User",

array_to_string

(

ARRAY   (

SELECT  sl.SOFTWARENAME

FROM    SOFTWARELIST sl

WHERE sl.SOFTWARENAME LIKE '%Microsoft%'

),

', '

) AS "Microsoft Software" FROM SystemInfo workstation 

LEFT JOIN Resources resource ON workstation.WORKSTATIONID=resource.RESOURCEID 

LEFT JOIN ComponentDefinition product ON resource.COMPONENTID=product.COMPONENTID 

LEFT JOIN ComponentDefinitionLaptop compDefLaptop ON product.COMPONENTID=compDefLaptop.COMPONENTID 

LEFT JOIN OsInfo osInfo ON workstation.WORKSTATIONID=osInfo.WORKSTATIONID

LEFT JOIN SoftwareInfo si ON workstation.WORKSTATIONID=si.WORKSTATIONID

LEFT JOIN SoftwareList sl ON si.SOFTWAREID=sl.SOFTWAREID

GROUP BY 1,2,3,4,5,6,7,8,9,10,11
 
The problem is when I run it, it duplcates the microsoft software, is there any way of making it report on each asset and what microsoft software is on that asset. I need to keep the rest of the fields like service tag etc.

                  New to ADSelfService Plus?