public.vwchatdata

public.vwchatdata

Description

Table Definition

CREATE VIEW vwchatdata AS (
 SELECT c.keyid,
    c.conversationid,
    c.conversationstart,
    c.conversationstartltc,
    c.userid,
    u.name AS username,
    u.department,
    u.title,
    c.chatinitiatedby,
    c.agentchatcount,
    c.agentchattotal,
    c.agentchatmax,
    c.agentchatmin,
    c.agenthasread,
    c.custchatcount,
    c.custchattotal,
    c.custchatmax,
    c.custchatmin,
    c.updated,
    c.mediatype,
        CASE
            WHEN ((c.mediatype)::text = 'chat'::text) THEN 'Chat'::text
            WHEN ((c.mediatype)::text = 'message'::text) THEN 'Message'::text
            ELSE 'Unknown'::text
        END AS mediatypedisplay
   FROM (chatdata c
     LEFT JOIN userdetails u ON (((c.userid)::text = (u.id)::text)))
)

Columns

Name Type Default Nullable Children Parents Comment
keyid varchar(50) true
conversationid varchar(50) true
conversationstart timestamp without time zone true
conversationstartltc timestamp without time zone true
userid varchar(50) true
username varchar(200) true
department varchar(200) true
title varchar(200) true
chatinitiatedby varchar(10) true
agentchatcount integer true
agentchattotal numeric(20,0) true
agentchatmax numeric(20,0) true
agentchatmin numeric(20,0) true
agenthasread numeric(20,2) true
custchatcount integer true
custchattotal numeric(20,0) true
custchatmax numeric(20,0) true
custchatmin numeric(20,0) true
updated timestamp without time zone true
mediatype varchar(10) true
mediatypedisplay text true

Referenced Tables

Name Columns Comment Type
public.chatdata 17 BASE TABLE
public.userdetails 13 BASE TABLE

    • Related Articles

    • public.participantattributesdynamic

      Description Columns Name Type Default Nullable Children Parents Comment keyid varchar(50) false conversationid varchar(50) false conversationstartdate timestamp without time zone false conversationstartdateltc timestamp without time zone true ...
    • public.evalquestiondata

      Description Columns Name Type Default Nullable Children Parents Comment keyid varchar(50) false evaluationid varchar(50) false evaluationformid varchar(50) false questiongroupid varchar(50) true questionid varchar(50) true answerid varchar(50) true ...
    • public.userpresencedetaileddata

      Description User Presence Detailed Data Columns Name Type Default Nullable Children Parents Comment keyid varchar(255) false Primary Key userid varchar(50) true Agent GUID starttime timestamp without time zone false Start Time (UTC) starttimeltc ...
    • public.userinteractionpresencedetaileddata

      Description Columns Name Type Default Nullable Children Parents Comment keyid varchar(255) false userid varchar(50) true starttime timestamp without time zone false starttimeltc timestamp without time zone true endtime timestamp without time zone ...
    • public.userpresencedata

      Description Columns Name Type Default Nullable Children Parents Comment keyid varchar(255) false id varchar(50) true userid varchar(50) true startdate timestamp without time zone false startdateltc timestamp without time zone true timetype ...