select sda.attachmentid AS "Attachment ID",
sda.attachmentname AS "Attachment Name",
sda.attachmentpath AS "Attachement Path",
sda.attachmentsize AS "File Size",
sda.description AS "Comments",
wo.workorderid AS "Request ID",
aau.first_name As "Requester Name",
ad.ORG_NAME AS "Account Name"
from sdeskattachment sda
left join workorderattachment wot on sda.attachmentid=wot.attachmentid
left join workorder wo on wot.workorderid=wo.workorderid
LEFT JOIN SDUser sdu ON wo.REQUESTERID=sdu.USERID
LEFT JOIN AaaUser aau ON sdu.USERID=aau.USER_ID
LEFT JOIN WorkOrderAccountMapping wam ON wo.WORKORDERID=wam.WORKORDERID
LEFT JOIN AccountDefinition ad ON wam.ACCOUNTID=ad.ORG_ID
where sda.module like 'request'