cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
718
Views
0
Helpful
1
Replies

Calls Offered from TCD Table

jmercado08
Level 1
Level 1

Hi All,

Can somebody please enlighten me on how I will get the total calls offered per agent per day using the Termination Call Detail Table. I was able to use the Variable1 as Line then look for the concerned variable. The result however is always different from CUIC, I don't know if I should really be comparing them.

SELECT Date, SUM(Offered) AS OFFERED

FROM
(
    SELECT  DISTINCT
        CAST(DateTime as Date) AS Date
        , RouterCallKey
        , Variable1 AS Line
        , Offered = 1

    FROM Termination_Call_Detail

    WHERE Variable1 LIKE '%US_BUF_TS%' AND Variable1 LIKE  '%_Q'
    AND DATEDIFF(month,DateTime,GETDATE()) = 1
) Volume

GROUP BY Date
ORDER BY Date

This is the code we run in SQL server. This runs OK but the result per day is never the same in cuic. Some days are off by 1, some are off by a hundred.  Also how do I get a line by line report for agent. This is currently grouped by date.

Please let me know if I am missing something here or if there a more correct approach to this.

Thanks very much for your help.

1 Accepted Solution

Accepted Solutions

ewindgat
Level 5
Level 5

I notice you are using GETDATE. Please check if the dates are saved in UTC. You could be having a time zone difference.

For example, you could use GETUTCDATE(). Then, you'll have to worry about the conversion between your time zone, and the time zone of were the data was saved.

View solution in original post

1 Reply 1

ewindgat
Level 5
Level 5

I notice you are using GETDATE. Please check if the dates are saved in UTC. You could be having a time zone difference.

For example, you could use GETUTCDATE(). Then, you'll have to worry about the conversion between your time zone, and the time zone of were the data was saved.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: