Survey Data View
CREATE VIEW vwsurveydata AS (
SELECT surveydata.surveyid,
surveydata.conversationid,
surveydata.surveyformid,
surveydata.surveyname,
surveydata.agentid,
agent.name AS agentname,
agent.department AS agentdepartment,
manager.name AS agentmanager,
surveydata.agentteamid,
surveydata.queueid,
queue.name AS queuename,
surveydata.status,
surveydata.totalscore,
surveydata.completeddate,
surveydata.completeddateltc,
surveydata.updated,
surveydata.lastpoll
FROM (((surveydata
LEFT JOIN userdetails agent ON (((agent.id)::text = (surveydata.agentid)::text)))
LEFT JOIN userdetails manager ON (((manager.id)::text = (agent.manager)::text)))
LEFT JOIN queuedetails queue ON (((queue.id)::text = (surveydata.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 | |||
status | varchar(20) | true | Survey Status | |||
totalscore | numeric(20,2) | true | Total Score | |||
completeddate | timestamp without time zone | true | Completion Date(UTC) | |||
completeddateltc | timestamp without time zone | true | Completion Date (LTC) | |||
updated | timestamp without time zone | true | Last Updated | |||
lastpoll | timestamp without time zone | true | Last Poll |
Name | Columns | Comment | Type |
---|---|---|---|
public.surveydata | 13 | BASE TABLE | |
public.userdetails | 13 | BASE TABLE | |
public.queuedetails | 17 | Queue Lookup data | BASE TABLE |