Query to show user additional fields along with requests

Query to show user additional fields along with requests

MSSQL:

SELECT wo.WORKORDERID AS "Ticket Number",
pd.PRIORITYNAME AS "Priority",
cd.CATEGORYNAME AS "Category",
qd.QUEUENAME AS "Group",
ti.FIRST_NAME AS "Technician",
technician.attribute_302 "Technician Business Unit",
aau.FIRST_NAME AS "Requester",
requester.attribute_301 "User Business Unit ",
Wo.title "Subject",
wotodesc.FULLDESCRIPTION AS "Description",
std.STATUSNAME AS "Request Status",
LONGTODATE(wos.LAST_TECH_UPDATE) AS "Last Upd Time",
taskdet.TITLE AS "Task Title",taskstatus.STATUSNAME AS "Task Status",
taskowner.FIRST_NAME AS "Task Owner",
taskdet.PER_OF_COMPLETION AS "Percentage Of Completion",
c.comment "Task Comments" FROM WorkOrder wo
LEFT JOIN SDUser sdu ON wo.REQUESTERID=sdu.USERID
LEFT JOIN AaaUser aau ON sdu.USERID=aau.USER_ID
LEFT JOIN WorkOrderToDescription wotodesc ON wo.WORKORDERID=wotodesc.WORKORDERID
LEFT JOIN WorkOrderStates wos ON wo.WORKORDERID=wos.WORKORDERID
LEFT JOIN CategoryDefinition cd ON wos.CATEGORYID=cd.CATEGORYID
LEFT JOIN SDUser td ON wos.OWNERID=td.USERID
LEFT JOIN AaaUser ti ON td.USERID=ti.USER_ID
LEFT JOIN "WorkOrder_Queue" "woq" ON "wo"."WORKORDERID"="woq"."WORKORDERID"
LEFT JOIN "QueueDefinition" "qd" ON "woq"."QUEUEID"="qd"."QUEUEID"
LEFT JOIN PriorityDefinition pd ON wos.PRIORITYID=pd.PRIORITYID
LEFT JOIN StatusDefinition std ON wos.STATUSID=std.STATUSID
LEFT JOIN workordertotaskdetails wtd on wtd.workorderid=wo.workorderid
LEFT JOIN taskdetails taskdet on taskdet.taskid=wtd.taskid
LEFT JOIN SDUser taskownersdu ON taskdet.OWNERID=taskownersdu.USERID
LEFT JOIN AaaUser taskowner ON taskownersdu.USERID=taskowner.USER_ID
LEFT JOIN StatusDefinition taskstatus ON taskdet.STATUSID=taskstatus.STATUSID
LEFT JOIN WorkOrder_Fields wof on wof.workorderid=wo.workorderid
LEFT JOIN TaskToComment tskc ON tskc.taskid = taskdet.taskid
LEFT JOIN Comments c ON tskc.commentid=c.commentid
LEFT JOIN ci ci1 ON ci1.ciid=sdu.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 ci ci2 ON ci2.ciid=td.ciid
LEFT JOIN baseelement be2 ON be2.ciid=ci2.ciid
LEFT JOIN people p2 ON p2.ciid=be2.ciid
LEFT JOIN technician ON technician.ciid=p2.ciid
GROUP BY Wo.workorderid,pd.PRIORITYNAME,cd.CATEGORYNAME,aaU.FIRST_NAME,ti.FIRST_NAME,QD.QUEUENAME, wotodesc.FULLDESCRIPTION,std.STATUSNAME,wos.LAST_TECH_UPDATE,taskdet.TITLE,Wo.TITLE,taskstatus.STATUSNAME,taskowner.FIRST_NAME,taskdet.PER_OF_COMPLETION,c.comment,technician.ATTRIBUTE_302, requester.attribute_301