Survey info

Survey info

Version : 14300
DB : MSSQL / PGSQL


OUTPUT :







Query :


SELECT wo.WORKORDERID AS "Request ID",
wo.TITLE AS "Request Title",
ad.org_name AS "Account",
qd.queuename AS "Group",
aau.FIRST_NAME AS "Requester",
dpt.DEPTNAME AS "Department",
ti.FIRST_NAME AS "Technician",
longtodate(srm.responsetime) AS "Survey Responded Date",
longtodate(srm.SENDTIME) AS "Survey Created Time",
smn.SURVEYNAME AS "Survey Name",
AaaLogin.NAME AS "Username Received By",
srcmt.COMMENTTEXT AS "Comments",
(select sra.ANSWER from Survey_Response_Answer sra
LEFT JOIN Survey_Response_Main srm ON sra.responseid=srm.responseid
left JOIN surveyresponserequestmapping srrm ON srm.responseid=srrm.responseid
where srrm.WORKORDERID= wo.WORKORDERID and quesid = 301) "How would you rate the timeliness of the initial response to your issue?",
(select sra.ANSWER from Survey_Response_Answer sra
LEFT JOIN Survey_Response_Main srm ON sra.responseid=srm.responseid
left JOIN surveyresponserequestmapping srrm ON srm.responseid=srrm.responseid
where srrm.WORKORDERID= wo.WORKORDERID and quesid = 302) "How would you rate the timeliness of the resolution of your issue?",
(select sra.ANSWER from Survey_Response_Answer sra
LEFT JOIN Survey_Response_Main srm ON sra.responseid=srm.responseid
left JOIN surveyresponserequestmapping srrm ON srm.responseid=srrm.responseid
where srrm.WORKORDERID= wo.WORKORDERID and quesid = 303) "Was the problem or task resolved to your satisfaction?",
(select sra.ANSWER from Survey_Response_Answer sra
LEFT JOIN Survey_Response_Main srm ON sra.responseid=srm.responseid
left JOIN surveyresponserequestmapping srrm ON srm.responseid=srrm.responseid
where srrm.WORKORDERID= wo.WORKORDERID and quesid = 304) "How would you rate the support representative's ability?",
(select sra.ANSWER from Survey_Response_Answer sra
LEFT JOIN Survey_Response_Main srm ON sra.responseid=srm.responseid
left JOIN surveyresponserequestmapping srrm ON srm.responseid=srrm.responseid
where srrm.WORKORDERID= wo.WORKORDERID and quesid = 305) "How would you rate the support representative's professionalism?",
(select sra.ANSWER from Survey_Response_Answer sra
LEFT JOIN Survey_Response_Main srm ON sra.responseid=srm.responseid
left JOIN surveyresponserequestmapping srrm ON srm.responseid=srrm.responseid
where srrm.WORKORDERID= wo.WORKORDERID and quesid = 306) "How satisfied were you with the overall service you received?",
(select sra.ANSWER from Survey_Response_Answer sra
LEFT JOIN Survey_Response_Main srm ON sra.responseid=srm.responseid
left JOIN surveyresponserequestmapping srrm ON srm.responseid=srrm.responseid
where srrm.WORKORDERID= wo.WORKORDERID and quesid = 307) "How likely are you to recommend LAWtrust to your clients and colleagues?",
(select sra.ANSWER from Survey_Response_Answer sra
LEFT JOIN Survey_Response_Main srm ON sra.responseid=srm.responseid
left JOIN surveyresponserequestmapping srrm ON srm.responseid=srrm.responseid
where srrm.WORKORDERID= wo.WORKORDERID and quesid = 601) "How likely are you to recommend LAWtrust to your clients and colleagues?",
(select sra.ANSWER from Survey_Response_Answer sra
LEFT JOIN Survey_Response_Main srm ON sra.responseid=srm.responseid
left JOIN surveyresponserequestmapping srrm ON srm.responseid=srrm.responseid
where srrm.WORKORDERID= wo.WORKORDERID and quesid = 602) "How likely are you to recommend LAWtrust to your clients and colleagues?",
(select sra.ANSWER from Survey_Response_Answer sra
LEFT JOIN Survey_Response_Main srm ON sra.responseid=srm.responseid
left JOIN surveyresponserequestmapping srrm ON srm.responseid=srrm.responseid
where srrm.WORKORDERID= wo.WORKORDERID and quesid = 603) "How likely are you to recommend LAWtrust to your clients and colleagues?",
(select sra.ANSWER from Survey_Response_Answer sra
LEFT JOIN Survey_Response_Main srm ON sra.responseid=srm.responseid
left JOIN surveyresponserequestmapping srrm ON srm.responseid=srrm.responseid
where srrm.WORKORDERID= wo.WORKORDERID and quesid = 604) "How likely are you to recommend LAWtrust to your clients and colleagues?",
(select sra.ANSWER from Survey_Response_Answer sra
LEFT JOIN Survey_Response_Main srm ON sra.responseid=srm.responseid
left JOIN surveyresponserequestmapping srrm ON srm.responseid=srrm.responseid
where srrm.WORKORDERID= wo.WORKORDERID and quesid = 605) "How likely are you to recommend LAWtrust to your clients and colleagues?",
(select sra.ANSWER from Survey_Response_Answer sra
LEFT JOIN Survey_Response_Main srm ON sra.responseid=srm.responseid
left JOIN surveyresponserequestmapping srrm ON srm.responseid=srrm.responseid
where srrm.WORKORDERID= wo.WORKORDERID and quesid = 606) "How likely are you to recommend LAWtrust to your clients and colleagues?",
(select sra.ANSWER from Survey_Response_Answer sra
LEFT JOIN Survey_Response_Main srm ON sra.responseid=srm.responseid
left JOIN surveyresponserequestmapping srrm ON srm.responseid=srrm.responseid
where srrm.WORKORDERID= wo.WORKORDERID and quesid = 1201) "How likely are you to recommend?",
(select sra.ANSWER from Survey_Response_Answer sra
LEFT JOIN Survey_Response_Main srm ON sra.responseid=srm.responseid
left JOIN surveyresponserequestmapping srrm ON srm.responseid=srrm.responseid
where srrm.WORKORDERID= wo.WORKORDERID and quesid = 1202) "Test",
case when srm.responsetime > 0 then aau.FIRST_NAME else null END AS "Survey Answered By" FROM SurveyResponseRequestMapping srrm
INNER JOIN Survey_Response_Main srm ON srrm.RESPONSEID=srm.RESPONSEID
LEFT JOIN Survey_Response_Comment srcmt ON srm.RESPONSEID=srcmt.RESPONSEID
LEFT JOIN Survey_Main smn ON srm.SURVEYID=smn.SURVEYID
LEFT JOIN WorkOrder wo ON srrm.WORKORDERID=wo.WORKORDERID
LEFT JOIN SDUser sdu ON wo.REQUESTERID=sdu.USERID
LEFT JOIN AaaUser aau ON sdu.USERID=aau.USER_ID
LEFT JOIN AaaLogin ON aau.USER_ID = AaaLogin.USER_ID
left join accountsitemapping asm on asm.siteid = wo.siteid
Left join accountdefinition ad on asm.accountid = ad.org_id
LEFT JOIN WorkOrderStates wos ON wo.workorderid=wos.workorderid
LEFT JOIN WorkOrder_Queue woq ON wo.WORKORDERID=woq.WORKORDERID
LEFT JOIN QueueDefinition qd ON woq.QUEUEID=qd.QUEUEID
LEFT JOIN SDUser td ON wos.OWNERID=td.USERID
LEFT JOIN AaaUser ti ON td.USERID=ti.USER_ID
LEFT JOIN DepartmentDefinition dpt ON wo.DEPTID=dpt.DEPTID

                New to ADSelfService Plus?