Survey Question Answers View
CREATE VIEW vwsurveyquestionanswers AS (
SELECT surveyquestionanswers.surveyid,
surveyquestionanswers.conversationid,
surveyquestionanswers.surveyformid,
surveyquestionanswers.surveyname,
surveyquestionanswers.agentid,
agent.name AS agentname,
agent.department AS agentdepartment,
manager.name AS agentmanager,
surveyquestionanswers.agentteamid,
surveyquestionanswers.queueid,
queue.name AS queuename,
surveyquestionanswers.questiongroupid,
surveyquestionanswers.questiongroupname,
surveyquestionanswers.questionid,
surveyquestionanswers.questiontext,
surveyquestionanswers.questiontype,
surveyquestionanswers.questionanswerid,
surveyquestionanswers.questionanswertext,
surveyquestionanswers.questionanswervalue,
surveyquestionanswers.questionscore,
surveyquestionanswers.questionmarkedna,
surveyquestionanswers.updated
FROM (((surveyquestionanswers
LEFT JOIN userdetails agent ON (((agent.id)::text = (surveyquestionanswers.agentid)::text)))
LEFT JOIN userdetails manager ON (((manager.id)::text = (agent.manager)::text)))
LEFT JOIN queuedetails queue ON (((queue.id)::text = (surveyquestionanswers.queueid)::text)))
)
Name | Type | Default | Nullable | Children | Parents | Comment |
---|---|---|---|---|---|---|
surveyid | varchar(50) | true | Survey GUID | |||
conversationid | varchar(50) | true | Conversation GUID | |||
surveyformid | varchar(50) | true | Survey Form GUID | |||
surveyname | varchar(200) | true | Survey Name | |||
agentid | varchar(50) | true | Agent GUID | |||
agentname | varchar(200) | true | Agent Name | |||
agentdepartment | varchar(200) | true | Agent Department | |||
agentmanager | varchar(200) | true | Agent Manager | |||
agentteamid | varchar(50) | true | Agent Team GUID | |||
queueid | varchar(50) | true | Queue GUID | |||
queuename | varchar(255) | true | Queue Name | |||
questiongroupid | varchar(50) | true | Question Group GUID | |||
questiongroupname | varchar(200) | true | Question Group Name | |||
questionid | varchar(50) | true | Question GUID | |||
questiontext | varchar(400) | true | Question Text | |||
questiontype | varchar(50) | true | Question Type | |||
questionanswerid | varchar(50) | true | Question Answer GUID | |||
questionanswertext | varchar(200) | true | Question Answer Text | |||
questionanswervalue | numeric(20,2) | true | Question Answer Value | |||
questionscore | numeric(20,2) | true | Question Score | |||
questionmarkedna | bit(1) | true | Question Marked as N/A | |||
updated | timestamp without time zone | true | Last Updated |
Name | Columns | Comment | Type |
---|---|---|---|
public.surveyquestionanswers | 18 | BASE TABLE | |
public.userdetails | 13 | BASE TABLE | |
public.queuedetails | 17 | Queue Lookup data | BASE TABLE |