Tested in build PGSQL (14300) and MSSQL (14306)
Shared to Tech:
SELECT wo.WORKORDERID AS "Request ID", wo.TITLE AS "Subject", qd.QUEUENAME AS "Group", ti.FIRST_NAME AS "Technician", LONGTODATE(wo.CREATEDTIME) AS "Created Time", LONGTODATE(wo.COMPLETEDTIME) AS "Completed Time", LONGTODATE(wo.RESOLVEDTIME) AS "Resolved Time", wos.ISOVERDUE AS "Overdue Status", sa.first_name "Shared to technician" FROM WorkOrder wo
LEFT JOIN WorkOrder_Queue woq ON wo.WORKORDERID=woq.WORKORDERID
LEFT JOIN QueueDefinition qd ON woq.QUEUEID=qd.QUEUEID
LEFT JOIN WorkOrderStates wos ON wo.WORKORDERID=wos.WORKORDERID
LEFT JOIN SDUser td ON wos.OWNERID=td.USERID
LEFT JOIN AaaUser ti ON td.USERID=ti.USER_ID
LEFT JOIN WO_SHARE_LIST wsl ON wo.workorderid=wsl.workorderid
LEFT JOIN TECHNICIAN_SHARE_LIST tsl ON wsl.shareid=tsl.shareid
LEFT JOIN aaauser sa ON tsl.techid=sa.user_id
WHERE (wo.ISPARENT='1') AND sa.first_name='Technician1' ORDER BY 1
Shared to Group:
SELECT wo.WORKORDERID AS "Request ID",
wo.TITLE AS "Subject",
aau.FIRST_NAME AS "Requester",
qd.QUEUENAME AS "Group",
ti.FIRST_NAME AS "Technician",
std.STATUSNAME AS "Request Status",
qa.queuename "Shared to group" FROM WorkOrder wo
LEFT JOIN SDUser sdu ON wo.REQUESTERID=sdu.USERID
LEFT JOIN AaaUser aau ON sdu.USERID=aau.USER_ID
LEFT JOIN WorkOrderStates wos ON wo.WORKORDERID=wos.WORKORDERID
LEFT JOIN SDUser td ON wos.OWNERID=td.USERID
LEFT JOIN AaaUser ti ON td.USERID=ti.USER_ID
LEFT JOIN StatusDefinition std ON wos.STATUSID=std.STATUSID
LEFT JOIN WorkOrder_Queue woq ON wo.WORKORDERID=woq.WORKORDERID
LEFT JOIN QueueDefinition qd ON woq.QUEUEID=qd.QUEUEID
LEFT JOIN WO_SHARE_LIST wsl ON wo.workorderid=wsl.workorderid
INNER JOIN GROUP_SHARE_LIST gsl ON wsl.shareid=gsl.shareid
LEFT JOIN queuedefinition qa ON gsl.queueid=qa.queueid
WHERE (wo.ISPARENT='1') AND qa.queuename='Group1' ORDER BY 1
Note: In both the queries, shared to tech name and shared to group names are highlighted. Please replace it with necessary values. Ensure that the exact name in the application is used in the query.