To make any changes to a query, refer to the KB article below.
MSSQL
SELECT Workorderid "Parent Request",
  (SELECT STUFF(
                  (SELECT cast(Child_woid AS varchar) + char(10)
                   FROM conversation co
                   WHERE conversation.Workorderid=co.Workorderid
                     FOR XML PATH ('')), 1, 0, '')) "Merged Request"FROM conversation
WHERE Child_woid IS NOT NULL
GROUP BY Workorderid
PGSQL
SELECT wo.workorderid "Request ID",
            wo.TITLE "Subject",
            LONGTODATE(wo.CREATEDTIME) "Created Time",
            LONGTODATE(wo.DUEBYTIME) "DueBy Time" , 
            array_to_string(array_agg(Child_woid), ',') "Merged Request" , 
            MAX(aaa.first_name) "merged by" from conversation 
LEFT JOIN workorder wo on conversation.Workorderid=wo.Workorderid 
left join WorkOrderHistory woh on wo.workorderid=woh.workorderid 
left join aaauser aaa on woh.operationownerid=aaa.user_id 
where 
      Child_woid is not NULL and 
      woh.operation='MERGEWITH' 
GROUP BY wo.Workorderid
                                                      
 
Note : Login to ServiceDesk Plus, go to Reports tab > New Query Report > Copy the query to the query editor and run the report.