SQl to calculate average time for call centre agents

  • A row is created in the CALLSTATUSLOGGING table every time an agent's state is changed. A row is also inserted when the application is started, the application is closed and an interaction (i.e. call) is complete.

    In order to report on this, we need to know the average time each agent has spent on each call in each of the states Talking, Hold and Wrap. The data should be presented in the following format – all times should be in seconds.

    AgentName    AvgTalking    AvgHold    AvgWrap
    agent1              
    agent2              
    agent3

  • Zalouncha - Friday, October 6, 2017 8:12 AM

    A row is created in the CALLSTATUSLOGGING table every time an agent's state is changed. A row is also inserted when the application is started, the application is closed and an interaction (i.e. call) is complete.

    In order to report on this, we need to know the average time each agent has spent on each call in each of the states Talking, Hold and Wrap. The data should be presented in the following format – all times should be in seconds.

    AgentName    AvgTalking    AvgHold    AvgWrap
    agent1              
    agent2              
    agent3

    There is no question here, just a requirement. What help are you seeking?
    We are going to need more info than this, in the form of sample data and expected results. Please see the first link in my signature for advice on how to post in such a way that you will get quality responses.

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • I need to create an sql which will generate a report on average time for agents where I work and I ma a bit stuck as per where to start from.

    The data in the db table looks like below:

    CALLSTATID,CLIENTNO,CALLLOGID,CPGNO,CALLSTATE,LOCALISEDCALLSTATE,STATETIMEAGT,USEDBYAGENT,LOGAGENTNO,CALLLOGREF,COMPLETECODE,CTI_USER
    1,1,10,5,Talking,Call time,08:27:38,agent1,123,NULL,NULL,70002
    2,1,10,5,Hold,Hold,08:30:36,agent1,123,NULL,NULL,70002
    3,1,10,5,Talking,Call time,08:34:17,agent1,123,NULL,NULL,70002
    4,1,10,5,Hold,Hold,08:34:18,agent1,123,NULL,NULL,70002
    5,1,10,5,Talking,Call time,08:34:52,agent1,123,NULL,NULL,70002
    6,1,10,5,WrapUp,Wrap Time,08:36:19,agent1,123,NULL,NULL,70002

    A row is created in the CALLSTATUSLOGGING table every time an agent's state is changed. A row is also inserted when the application is started, the application is closed and an interaction (i.e. call) is complete.
    In order to report on this, we need to know the average time each agent has spent on each call in each of the states Talking, Hold and Wrap.

    The data should be presented in the following format – all times should be in seconds.
    AgentName AvgTalking AvgHold AvgWrap
    agent1 
    agent2 
    agent3

    Any tips are welcome.

  • Like Phil said, we have a requirement here. Are you actually asking how to work out an average? If so, which type of Average: Mode, Mean, Median? Let's assume you mean the mode (which is what most people define as the default average).

    To work out an average you take the sum of the values you have, and divide it by the amount of values you have. So, for example, Steve has 5 Apples, Jane has 2, and Greg as 2. The Total number of Apples is 9, and there are 3 people. 9 / 3 = 3, thus the average number of Apples each person has is 3.

    To get your averages for your stats, you'll need to SUM the values of your Hold Time, and then divide it by the number of Calls. SQL Server conveniently has the AVG(), which effectively does SUM(Value)/COUNT(Value) for you, so if you have 1 entry per call, with a value for your Hold Time, etc, you be able to make easy use of this. If not, you'll need to Normalise it first, and then do the maths.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Zalouncha - Friday, October 6, 2017 8:32 AM

    I need to create an sql which will generate a report on average time for agents where I work and I ma a bit stuck as per where to start from.
    The data in the db table looks like attached in the file.
    A row is created in the CALLSTATUSLOGGING table every time an agent's state is changed. A row is also inserted when the application is started, the application is closed and an interaction (i.e. call) is complete.
    In order to report on this, we need to know the average time each agent has spent on each call in each of the states Talking, Hold and Wrap.

    The data should be presented in the following format – all times should be in seconds.
    AgentName AvgTalking AvgHold AvgWrap
    agent1 
    agent2 
    agent3

    Any tips are welcome.

    Rather than a spreadsheet, which many will not open for security reasons (would you be happy opening a spreadsheet from a complete stranger?), could you please provide the data in a consumable format. Have a look at my signature for how to do so. We'll also need to have your expected results for the sample data you provide.

    Thanks.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Thanks for your answer. Actually what I am trying to do is to calculate the average time of each agent in a given state of a call. each agent state changes from talking,Hold, Wrap up.

    Therefore what i am trying to do is to write a query whicjh wll in effect provide me the information ie agent 1 overall talking time, agent 1 overall hold time and agent 1 overall wrapup time.

  • Without seeing your sample data, from your description I understand that a new row is inserted each time a status changes (with a duration? I've guessed yes). I also assume, without seeing expected output, that if a single call has multiple hold/talk durations, that are summed and then counted once for the average.

    One way, therefore, would be to firstly summarise your data for each call, using SUM and CASE expressions (so that you normalise the data); you could do this in a CTE. Then, outside the summary (CTE) do your average for each User.

    As I said, the above is guess work, as i don't know what your data looks like (I'm working off your description). If you provide some sample data, I'll be happy to provide some sample SQL using it.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Hi Thom A,

    my data look slik ebelow:

    CALLSTATID,CLIENTNO,CALLLOGID,CPGNO,CALLSTATE,LOCALISEDCALLSTATE,STATETIMEAGT,USEDBYAGENT,LOGAGENTNO,CALLLOGREF,COMPLETECODE,CTI_USER
    1,1,10,5,Talking,Call time,08:27:38,agent1,123,NULL,NULL,70002
    2,1,10,5,Hold,Hold,08:30:36,agent1,123,NULL,NULL,70002
    3,1,10,5,Talking,Call time,08:34:17,agent1,123,NULL,NULL,70002
    4,1,10,5,Hold,Hold,08:34:18,agent1,123,NULL,NULL,70002
    5,1,10,5,Talking,Call time,08:34:52,agent1,123,NULL,NULL,70002
    6,1,10,5,WrapUp,Wrap Time,08:36:19,agent1,123,NULL,NULL,70

  • It looks like the data is in a format where each event is recorded, and not the duration, so before he can get an average, he first has to figure out how to determine from the data, what the duration of each event is.   I don't have time today to play with this or I'd be coding right now.   Maybe Luis Cazares can pick this up and run with it.  I can certainly see why this poster is having trouble, as he doesn't know how to relate a value in one record to a value in another record in a group.  It's not exactly straightforward until you've been through this kind of thing a number of times.

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

  • Zalouncha - Friday, October 6, 2017 9:07 AM

    Hi Thom A,

    my data look slik ebelow:

    CALLSTATID,CLIENTNO,CALLLOGID,CPGNO,CALLSTATE,LOCALISEDCALLSTATE,STATETIMEAGT,USEDBYAGENT,LOGAGENTNO,CALLLOGREF,COMPLETECODE,CTI_USER
    1,1,10,5,Talking,Call time,08:27:38,agent1,123,NULL,NULL,70002
    2,1,10,5,Hold,Hold,08:30:36,agent1,123,NULL,NULL,70002
    3,1,10,5,Talking,Call time,08:34:17,agent1,123,NULL,NULL,70002
    4,1,10,5,Hold,Hold,08:34:18,agent1,123,NULL,NULL,70002
    5,1,10,5,Talking,Call time,08:34:52,agent1,123,NULL,NULL,70002
    6,1,10,5,WrapUp,Wrap Time,08:36:19,agent1,123,NULL,NULL,70

    Thanks. it would be great, however, if you could put this in a format that is consumable. I've not used your data, but made something of my own, maybe this will get you on the right path. It also shows you how to provide the data iin the way we need it:
    USE Sandbox;
    GO
    --Sample TAble
    CREATE TABLE CallLog
      (LogID int IDENTITY(1,1),
      CallID int,
      UserID int,
      StatusName varchar(10),
      Duration int);
    GO
    --Sample Data
    INSERT INTO CallLog (CallID, UserID, StatusName, Duration)
    VALUES
      (1,1,'Talking',50),
      (1,1,'On Hold',12),
      (1,1,'Talking',12),
      (1,1,'Wrap up',5),
      (2,1,'Talking',90),
      (2,1,'On Hold',60),
      (2,1,'Talking',150),
      (2,1,'On Hold',45),
      (2,1,'Talking',30),
      (2,1,'Wrap up',5);
    GO
    --Check data
    SELECT *
    FROM CallLog;
    --Expected output

    SELECT 1 AS UserID,
       166 AS AvgTalking, 58 AS AvgOnHold, 5 AS AvgWrapUp;
    GO
    --Solution
    --Start with CTE
    WITH Summary AS (
      --Summarise data into totals per call
      SELECT UserID, CallID,
        SUM(CASE StatusName WHEN 'Talking' THEN Duration END) AS TalkingDuration,
        SUM(CASE StatusName WHEN 'On Hold' THEN Duration END) AS OnHoldDuration,
        SUM(CASE StatusName WHEN 'Wrap Up' THEN Duration END) AS WrapUpDuration
      FROM CallLog
      GROUP BY UserID, CallID)
    --Average values per user (although there is only 1)
    SELECT UserID,
       AVG(TalkingDuration) AS AvgTalking,
       AVG(OnHoldDuration) AS AvgOnHold,
       AVG(WrapUpDuration) AS AvgWrapUp
    FROM Summary
    GROUP BY UserID;

    GO
    --Clean up
    DROP TABLE CallLog;
    GO

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Thom A - Friday, October 6, 2017 9:18 AM

    Zalouncha - Friday, October 6, 2017 9:07 AM

    Hi Thom A,

    my data look slik ebelow:

    CALLSTATID,CLIENTNO,CALLLOGID,CPGNO,CALLSTATE,LOCALISEDCALLSTATE,STATETIMEAGT,USEDBYAGENT,LOGAGENTNO,CALLLOGREF,COMPLETECODE,CTI_USER
    1,1,10,5,Talking,Call time,08:27:38,agent1,123,NULL,NULL,70002
    2,1,10,5,Hold,Hold,08:30:36,agent1,123,NULL,NULL,70002
    3,1,10,5,Talking,Call time,08:34:17,agent1,123,NULL,NULL,70002
    4,1,10,5,Hold,Hold,08:34:18,agent1,123,NULL,NULL,70002
    5,1,10,5,Talking,Call time,08:34:52,agent1,123,NULL,NULL,70002
    6,1,10,5,WrapUp,Wrap Time,08:36:19,agent1,123,NULL,NULL,70

    Thanks. it would be great, however, if you could put this in a format that is consumable. I've not used your data, but made something of my own, maybe this will get you on the right path. It also shows you how to provide the data iin the way we need it:
    USE Sandbox;
    GO
    --Sample TAble
    CREATE TABLE CallLog
      (LogID int IDENTITY(1,1),
      CallID int,
      UserID int,
      StatusName varchar(10),
      Duration int);
    GO
    --Sample Data
    INSERT INTO CallLog (CallID, UserID, StatusName, Duration)
    VALUES
      (1,1,'Talking',50),
      (1,1,'On Hold',12),
      (1,1,'Talking',12),
      (1,1,'Wrap up',5),
      (2,1,'Talking',90),
      (2,1,'On Hold',60),
      (2,1,'Talking',150),
      (2,1,'On Hold',45),
      (2,1,'Talking',30),
      (2,1,'Wrap up',5);
    GO
    --Check data
    SELECT *
    FROM CallLog;
    --Expected output

    SELECT 1 AS UserID,
       166 AS AvgTalking, 58 AS AvgOnHold, 5 AS AvgWrapUp;
    GO
    --Solution
    --Start with CTE
    WITH Summary AS (
      --Summarise data into totals per call
      SELECT UserID, CallID,
        SUM(CASE StatusName WHEN 'Talking' THEN Duration END) AS TalkingDuration,
        SUM(CASE StatusName WHEN 'On Hold' THEN Duration END) AS OnHoldDuration,
        SUM(CASE StatusName WHEN 'Wrap Up' THEN Duration END) AS WrapUpDuration
      FROM CallLog
      GROUP BY UserID, CallID)
    --Average values per user (although there is only 1)
    SELECT UserID,
       AVG(TalkingDuration) AS AvgTalking,
       AVG(OnHoldDuration) AS AvgOnHold,
       AVG(WrapUpDuration) AS AvgWrapUp
    FROM Summary
    GROUP BY UserID;

    GO
    --Clean up
    DROP TABLE CallLog;
    GO

    Thom,

    This poster will first need to determine duration from multiple records within a given group thereof.   You provide duration where his data does not, as it must be computed from the start records provided to tne very next record in time sequence, which has to be assumed is the end of the previous event.  Also, as this data has no dates in it, he may have to worry about a call that spans midnight.   Truly problematic, especially if the time data is in a 12 hour format as opposed to a 24 hour one.   Could be a nearly impossible task.

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

  • sgmunson - Friday, October 6, 2017 9:26 AM

    Thom,

    This poster will first need to determine duration from multiple records within a given group thereof.   You provide duration where his data does not, as it must be computed from the start records provided to tne very next record in time sequence, which has to be assumed is the end of the previous event.  Also, as this data has no dates in it, he may have to worry about a call that spans midnight.   Truly problematic, especially if the time data is in a 12 hour format as opposed to a 24 hour one.   Could be a nearly impossible task.

    Indeed, I agree. My main point, to start, was that it was an example or what they could do in the absence of true consumable sample data.

    On the subject of not having a datetime field, this would honest truly surprise me. I've had the (dis)pleasure of working with a many Call Centre SQL back ends, but all of them have included a date and time section for their data. If the OP's doesn't have this, then I agree, the task it going to likely be difficult but I do have a couple of ideas. However, I'd rather have proper data to work with, rather than making up my own or having to try and consume what the OP has simply pasted from SSMS. Especially when it's Friday and almost the end of the day! ^_^

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • hi guys,

    thanks a lot for your help. I have now went through the steps on how to get the dat ain a proper way to you and i tis as follow:

    SELECT '1','0','41341','0','StartApplication''Application Start','Sep 5 2017 7:38AM','agent1','3338','StartApplication' UNION ALL
    SELECT '2','0','41343','0','StartApplication''Application Start','Sep 5 2017 7:51AM','agent2','3340','StartApplication' UNION ALL
    SELECT '3','1679235','41343','16','Talking''Call time','Sep 5 2017 8:04AM','agent2','3340','Talking' UNION ALL
    SELECT '4','1679236','41341','16','Talking''Call time','Sep 5 2017 8:04AM','agent1','3338','Talking' UNION ALL
    SELECT '5','1679235','41343','16','WrapUp''Wrap Time','Sep 5 2017 8:07AM','agent2','3340','WrapUp' UNION ALL
    SELECT '6','1679235','41343','16','InteractionComplete''Interaction Complete','Sep 5 2017 8:07AM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '7','1679238','41350','16','Talking''Call time','Sep 5 2017 8:08AM','agent2','3340','Talking' UNION ALL
    SELECT '8','1679236','41341','16','WrapUp''Wrap Time','Sep 5 2017 8:12AM','agent1','3338','WrapUp' UNION ALL
    SELECT '9','1679236','41341','16','InteractionComplete''Interaction Complete','Sep 5 2017 8:12AM','agent1','3338','InteractionComplete' UNION ALL
    SELECT '10','1679248','41360','16','Talking''Call time','Sep 5 2017 8:15AM','agent1','3338','Talking' UNION ALL
    SELECT '11','1679248','41360','16','WrapUp''Wrap Time','Sep 5 2017 8:18AM','agent1','3338','WrapUp' UNION ALL
    SELECT '12','1679248','41360','16','InteractionComplete''Interaction Complete','Sep 5 2017 8:19AM','agent1','3338','InteractionComplete' UNION ALL
    SELECT '13','1679238','41350','16','WrapUp''Wrap Time','Sep 5 2017 8:20AM','agent2','3340','WrapUp' UNION ALL
    SELECT '14','1679238','41350','16','InteractionComplete''Interaction Complete','Sep 5 2017 8:21AM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '15','1679257','41369','16','Talking''Call time','Sep 5 2017 8:21AM','agent2','3340','Talking' UNION ALL
    SELECT '16','1679265','41379','16','Talking''Call time','Sep 5 2017 8:27AM','agent1','3338','Talking' UNION ALL
    SELECT '17','1679265','41379','16','Hold''Hold','Sep 5 2017 8:30AM','agent1','3338','Hold' UNION ALL
    SELECT '18','1679265','41379','16','Talking''Call time','Sep 5 2017 8:34AM','agent1','3338','Talking' UNION ALL
    SELECT '19','1679265','41379','16','Hold''Hold','Sep 5 2017 8:34AM','agent1','3338','Hold' UNION ALL
    SELECT '20','1679265','41379','16','Talking''Call time','Sep 5 2017 8:34AM','agent1','3338','Talking' UNION ALL
    SELECT '21','1679265','41379','16','WrapUp''Wrap Time','Sep 5 2017 8:36AM','agent1','3338','WrapUp' UNION ALL
    SELECT '22','1679265','41379','16','InteractionComplete''Interaction Complete','Sep 5 2017 8:36AM','agent1','3338','InteractionComplete' UNION ALL
    SELECT '23','1679257','41369','16','WrapUp''Wrap Time','Sep 5 2017 8:36AM','agent2','3340','WrapUp' UNION ALL
    SELECT '24','1679257','41369','16','InteractionComplete''Interaction Complete','Sep 5 2017 8:36AM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '25','1679285','41399','16','Talking''Call time','Sep 5 2017 8:36AM','agent2','3340','Talking' UNION ALL
    SELECT '26','1679285','41399','16','Hold''Hold','Sep 5 2017 8:40AM','agent2','3340','Hold' UNION ALL
    SELECT '27','1679295','41408','16','Talking''Call time','Sep 5 2017 8:42AM','agent1','3338','Talking' UNION ALL
    SELECT '28','1679285','41399','16','Talking''Call time','Sep 5 2017 8:43AM','agent2','3340','Talking' UNION ALL
    SELECT '29','1679295','41408','16','Hold''Hold','Sep 5 2017 8:44AM','agent1','3338','Hold' UNION ALL
    SELECT '30','0','41416','0','StartApplication''Application Start','Sep 5 2017 8:45AM','agent3','3363','StartApplication' UNION ALL
    SELECT '31','1679295','41408','16','WrapUp''Wrap Time','Sep 5 2017 8:46AM','agent1','3338','WrapUp' UNION ALL
    SELECT '32','1679295','41408','16','InteractionComplete''Interaction Complete','Sep 5 2017 8:46AM','agent1','3338','InteractionComplete' UNION ALL
    SELECT '33','1679309','41424','16','Talking''Call time','Sep 5 2017 8:47AM','agent1','3338','Talking' UNION ALL
    SELECT '34','1679285','41399','16','WrapUp''Wrap Time','Sep 5 2017 8:48AM','agent2','3340','WrapUp' UNION ALL
    SELECT '35','1679285','41399','16','InteractionComplete''Interaction Complete','Sep 5 2017 8:48AM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '36','1679310','41425','16','Talking''Call time','Sep 5 2017 8:48AM','agent2','3340','Talking' UNION ALL
    SELECT '37','1679309','41424','16','WrapUp''Wrap Time','Sep 5 2017 8:53AM','agent1','3338','WrapUp' UNION ALL
    SELECT '38','1679309','41424','16','InteractionComplete''Interaction Complete','Sep 5 2017 8:53AM','agent1','3338','InteractionComplete' UNION ALL
    SELECT '39','1679310','41425','16','WrapUp''Wrap Time','Sep 5 2017 8:54AM','agent2','3340','WrapUp' UNION ALL
    SELECT '40','1679310','41425','16','InteractionComplete''Interaction Complete','Sep 5 2017 8:55AM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '41','1679325','41443','16','Talking''Call time','Sep 5 2017 8:55AM','agent2','3340','Talking' UNION ALL
    SELECT '42','1679331','41449','16','Talking''Call time','Sep 5 2017 8:57AM','agent1','3338','Talking' UNION ALL
    SELECT '43','1679343','41416','16','Talking''Call time','Sep 5 2017 9:00AM','agent3','3363','Talking' UNION ALL
    SELECT '44','1679331','41449','16','Hold''Hold','Sep 5 2017 9:01AM','agent1','3338','Hold' UNION ALL
    SELECT '45','1679325','41443','16','WrapUp''Wrap Time','Sep 5 2017 9:04AM','agent2','3340','WrapUp' UNION ALL
    SELECT '46','1679331','41449','16','Talking''Call time','Sep 5 2017 9:04AM','agent1','3338','Talking' UNION ALL
    SELECT '47','1679331','41449','16','Hold''Hold','Sep 5 2017 9:04AM','agent1','3338','Hold' UNION ALL
    SELECT '48','1679343','41416','16','WrapUp''Wrap Time','Sep 5 2017 9:05AM','agent3','3363','WrapUp' UNION ALL
    SELECT '49','1679325','41443','16','InteractionComplete''Interaction Complete','Sep 5 2017 9:05AM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '50','1679360','41477','16','Talking''Call time','Sep 5 2017 9:05AM','agent2','3340','Talking' UNION ALL
    SELECT '51','1679360','41477','16','WrapUp''Wrap Time','Sep 5 2017 9:06AM','agent2','3340','WrapUp' UNION ALL
    SELECT '52','1679360','41477','16','InteractionComplete''Interaction Complete','Sep 5 2017 9:06AM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '53','1679343','41416','16','InteractionComplete''Interaction Complete','Sep 5 2017 9:06AM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '54','1679362','41479','16','Talking''Call time','Sep 5 2017 9:06AM','agent3','3363','Talking' UNION ALL
    SELECT '55','1679363','41480','16','Talking''Call time','Sep 5 2017 9:06AM','agent2','3340','Talking' UNION ALL
    SELECT '56','1679331','41449','16','Talking''Call time','Sep 5 2017 9:07AM','agent1','3338','Talking' UNION ALL
    SELECT '57','1679362','41479','16','WrapUp''Wrap Time','Sep 5 2017 9:08AM','agent3','3363','WrapUp' UNION ALL
    SELECT '58','1679331','41449','16','WrapUp''Wrap Time','Sep 5 2017 9:08AM','agent1','3338','WrapUp' UNION ALL
    SELECT '59','1679331','41449','16','InteractionComplete''Interaction Complete','Sep 5 2017 9:08AM','agent1','3338','InteractionComplete' UNION ALL
    SELECT '60','1679362','41479','16','InteractionComplete''Interaction Complete','Sep 5 2017 9:08AM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '61','1679370','41486','16','Talking''Call time','Sep 5 2017 9:09AM','agent3','3363','Talking' UNION ALL
    SELECT '62','1679363','41480','16','WrapUp''Wrap Time','Sep 5 2017 9:11AM','agent2','3340','WrapUp' UNION ALL
    SELECT '63','1679363','41480','16','InteractionComplete''Interaction Complete','Sep 5 2017 9:12AM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '64','1679380','41494','16','Talking''Call time','Sep 5 2017 9:12AM','agent2','3340','Talking' UNION ALL
    SELECT '65','1679387','41501','16','Talking''Call time','Sep 5 2017 9:12AM','agent1','3338','Talking' UNION ALL
    SELECT '66','1679380','41494','16','Hold''Hold','Sep 5 2017 9:15AM','agent2','3340','Hold' UNION ALL
    SELECT '67','1679387','41501','16','Hold''Hold','Sep 5 2017 9:15AM','agent1','3338','Hold' UNION ALL
    SELECT '68','1679380','41494','16','WrapUp''Wrap Time','Sep 5 2017 9:17AM','agent2','3340','WrapUp' UNION ALL
    SELECT '69','1679387','41501','16','WrapUp''Wrap Time','Sep 5 2017 9:17AM','agent1','3338','WrapUp' UNION ALL
    SELECT '70','1679380','41494','16','InteractionComplete''Interaction Complete','Sep 5 2017 9:18AM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '71','1679387','41501','16','InteractionComplete''Interaction Complete','Sep 5 2017 9:18AM','agent1','3338','InteractionComplete' UNION ALL
    SELECT '72','1679406','41518','16','Talking''Call time','Sep 5 2017 9:18AM','agent2','3340','Talking' UNION ALL
    SELECT '73','1679406','41518','16','WrapUp''Wrap Time','Sep 5 2017 9:21AM','agent2','3340','WrapUp' UNION ALL
    SELECT '74','1679406','41518','16','InteractionComplete''Interaction Complete','Sep 5 2017 9:21AM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '75','1679419','41531','16','Talking''Call time','Sep 5 2017 9:21AM','agent2','3340','Talking' UNION ALL
    SELECT '76','1679370','41486','16','WrapUp''Wrap Time','Sep 5 2017 9:25AM','agent3','3363','WrapUp' UNION ALL
    SELECT '77','1679370','41486','16','InteractionComplete''Interaction Complete','Sep 5 2017 9:26AM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '78','1679433','41547','16','Talking''Call time','Sep 5 2017 9:26AM','agent3','3363','Talking' UNION ALL
    SELECT '79','1679419','41531','16','WrapUp''Wrap Time','Sep 5 2017 9:28AM','agent2','3340','WrapUp' UNION ALL
    SELECT '80','1679419','41531','16','InteractionComplete''Interaction Complete','Sep 5 2017 9:29AM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '81','1679446','41559','16','Talking''Call time','Sep 5 2017 9:29AM','agent2','3340','Talking' UNION ALL
    SELECT '82','1679448','41561','16','Talking''Call time','Sep 5 2017 9:29AM','agent1','3338','Talking' UNION ALL
    SELECT '83','1679448','41561','16','Hold''Hold','Sep 5 2017 9:30AM','agent1','3338','Hold' UNION ALL
    SELECT '84','1679448','41561','16','WrapUp''Wrap Time','Sep 5 2017 9:30AM','agent1','3338','WrapUp' UNION ALL
    SELECT '85','1679448','41561','16','InteractionComplete''Interaction Complete','Sep 5 2017 9:30AM','agent1','3338','InteractionComplete' UNION ALL
    SELECT '86','1679446','41559','16','Hold''Hold','Sep 5 2017 9:35AM','agent2','3340','Hold' UNION ALL
    SELECT '87','1679446','41559','16','Talking''Call time','Sep 5 2017 9:39AM','agent2','3340','Talking' UNION ALL
    SELECT '88','1679433','41547','16','WrapUp''Wrap Time','Sep 5 2017 9:42AM','agent3','3363','WrapUp' UNION ALL
    SELECT '89','1679433','41547','16','InteractionComplete''Interaction Complete','Sep 5 2017 9:43AM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '90','1679489','41600','16','Talking''Call time','Sep 5 2017 9:43AM','agent3','3363','Talking' UNION ALL
    SELECT '91','1679446','41559','16','WrapUp''Wrap Time','Sep 5 2017 9:46AM','agent2','3340','WrapUp' UNION ALL
    SELECT '92','1679489','41600','16','WrapUp''Wrap Time','Sep 5 2017 9:46AM','agent3','3363','WrapUp' UNION ALL
    SELECT '93','1679446','41559','16','InteractionComplete''Interaction Complete','Sep 5 2017 9:46AM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '94','1679500','41612','16','Talking''Call time','Sep 5 2017 9:46AM','agent2','3340','Talking' UNION ALL
    SELECT '95','1679489','41600','16','InteractionComplete''Interaction Complete','Sep 5 2017 9:47AM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '96','1679504','41616','16','Talking''Call time','Sep 5 2017 9:47AM','agent3','3363','Talking' UNION ALL
    SELECT '97','1679504','41616','16','WrapUp''Wrap Time','Sep 5 2017 9:51AM','agent3','3363','WrapUp' UNION ALL
    SELECT '98','1679504','41616','16','InteractionComplete''Interaction Complete','Sep 5 2017 9:51AM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '99','1679519','41631','16','Talking''Call time','Sep 5 2017 9:51AM','agent3','3363','Talking' UNION ALL
    SELECT '100','1679500','41612','16','Hold''Hold','Sep 5 2017 9:55AM','agent2','3340','Hold' UNION ALL
    SELECT '101','1679500','41612','16','Talking''Call time','Sep 5 2017 9:56AM','agent2','3340','Talking' UNION ALL
    SELECT '102','1679500','41612','16','WrapUp''Wrap Time','Sep 5 2017 9:58AM','agent2','3340','WrapUp' UNION ALL
    SELECT '103','1679519','41631','16','WrapUp''Wrap Time','Sep 5 2017 9:59AM','agent3','3363','WrapUp' UNION ALL
    SELECT '104','1679519','41631','16','InteractionComplete''Interaction Complete','Sep 5 2017 10:00AM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '105','1679540','41652','16','Talking''Call time','Sep 5 2017 10:00AM','agent3','3363','Talking' UNION ALL
    SELECT '106','1679540','41652','16','WrapUp''Wrap Time','Sep 5 2017 10:01AM','agent3','3363','WrapUp' UNION ALL
    SELECT '107','1679540','41652','16','InteractionComplete''Interaction Complete','Sep 5 2017 10:02AM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '108','1679550','41662','16','Talking''Call time','Sep 5 2017 10:02AM','agent3','3363','Talking' UNION ALL
    SELECT '109','1679559','41672','16','Talking''Call time','Sep 5 2017 10:06AM','agent1','3338','Talking' UNION ALL
    SELECT '110','1679559','41672','16','Hold''Hold','Sep 5 2017 10:08AM','agent1','3338','Hold' UNION ALL
    SELECT '111','1679559','41672','16','WrapUp''Wrap Time','Sep 5 2017 10:11AM','agent1','3338','WrapUp' UNION ALL
    SELECT '112','1679559','41672','16','InteractionComplete''Interaction Complete','Sep 5 2017 10:11AM','agent1','3338','InteractionComplete' UNION ALL
    SELECT '113','1679575','41686','16','Talking''Call time','Sep 5 2017 10:11AM','agent1','3338','Talking' UNION ALL
    SELECT '114','1679575','41686','16','WrapUp''Wrap Time','Sep 5 2017 10:12AM','agent1','3338','WrapUp' UNION ALL
    SELECT '115','1679575','41686','16','InteractionComplete''Interaction Complete','Sep 5 2017 10:12AM','agent1','3338','InteractionComplete' UNION ALL
    SELECT '116','1679578','41689','16','Talking''Call time','Sep 5 2017 10:12AM','agent1','3338','Talking' UNION ALL
    SELECT '117','1679578','41689','16','WrapUp''Wrap Time','Sep 5 2017 10:13AM','agent1','3338','WrapUp' UNION ALL
    SELECT '118','1679578','41689','16','InteractionComplete''Interaction Complete','Sep 5 2017 10:13AM','agent1','3338','InteractionComplete' UNION ALL
    SELECT '119','1679584','41695','16','Talking''Call time','Sep 5 2017 10:13AM','agent1','3338','Talking' UNION ALL
    SELECT '120','1679500','41612','16','InteractionComplete''Interaction Complete','Sep 5 2017 10:04AM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '121','1679587','41698','16','Talking''Call time','Sep 5 2017 10:14AM','agent2','3340','Talking' UNION ALL
    SELECT '122','1679584','41695','16','WrapUp''Wrap Time','Sep 5 2017 10:17AM','agent1','3338','WrapUp' UNION ALL
    SELECT '123','1679584','41695','16','InteractionComplete''Interaction Complete','Sep 5 2017 10:17AM','agent1','3338','InteractionComplete' UNION ALL
    SELECT '124','1679600','41712','16','Talking''Call time','Sep 5 2017 10:17AM','agent1','3338','Talking' UNION ALL
    SELECT '125','1679600','41712','16','Hold''Hold','Sep 5 2017 10:21AM','agent1','3338','Hold' UNION ALL
    SELECT '126','1679587','41698','16','WrapUp''Wrap Time','Sep 5 2017 10:22AM','agent2','3340','WrapUp' UNION ALL
    SELECT '127','1679587','41698','16','InteractionComplete''Interaction Complete','Sep 5 2017 10:22AM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '128','1679615','41728','16','Talking''Call time','Sep 5 2017 10:22AM','agent2','3340','Talking' UNION ALL
    SELECT '129','1679600','41712','16','Talking''Call time','Sep 5 2017 10:24AM','agent1','3338','Talking' UNION ALL
    SELECT '130','1679600','41712','16','Hold''Hold','Sep 5 2017 10:24AM','agent1','3338','Hold' UNION ALL
    SELECT '131','1679615','41728','16','Hold''Hold','Sep 5 2017 10:25AM','agent2','3340','Hold' UNION ALL
    SELECT '132','1679615','41728','16','WrapUp''Wrap Time','Sep 5 2017 10:25AM','agent2','3340','WrapUp' UNION ALL
    SELECT '133','1679600','41712','16','Talking''Call time','Sep 5 2017 10:25AM','agent1','3338','Talking' UNION ALL
    SELECT '134','1679600','41712','16','Hold''Hold','Sep 5 2017 10:26AM','agent1','3338','Hold' UNION ALL
    SELECT '135','1679615','41728','16','InteractionComplete''Interaction Complete','Sep 5 2017 10:28AM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '136','1679634','41745','16','Talking''Call time','Sep 5 2017 10:28AM','agent2','3340','Talking' UNION ALL
    SELECT '137','1679600','41712','16','Talking''Call time','Sep 5 2017 10:32AM','agent1','3338','Talking' UNION ALL
    SELECT '138','1679550','41662','16','WrapUp''Wrap Time','Sep 5 2017 10:33AM','agent3','3363','WrapUp' UNION ALL
    SELECT '139','1679550','41662','16','InteractionComplete''Interaction Complete','Sep 5 2017 10:34AM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '140','1679656','41768','16','Talking''Call time','Sep 5 2017 10:34AM','agent3','3363','Talking' UNION ALL
    SELECT '141','1679656','41768','16','WrapUp''Wrap Time','Sep 5 2017 10:37AM','agent3','3363','WrapUp' UNION ALL
    SELECT '142','1679656','41768','16','InteractionComplete''Interaction Complete','Sep 5 2017 10:37AM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '143','1679664','41776','16','Talking''Call time','Sep 5 2017 10:37AM','agent3','3363','Talking' UNION ALL
    SELECT '144','1679600','41712','16','Hold''Hold','Sep 5 2017 10:37AM','agent1','3338','Hold' UNION ALL
    SELECT '145','1679600','41712','16','Talking''Call time','Sep 5 2017 10:39AM','agent1','3338','Talking' UNION ALL
    SELECT '146','1679634','41745','16','WrapUp''Wrap Time','Sep 5 2017 10:46AM','agent2','3340','WrapUp' UNION ALL
    SELECT '147','1679600','41712','16','Hold''Hold','Sep 5 2017 10:46AM','agent1','3338','Hold' UNION ALL
    SELECT '148','1679634','41745','16','InteractionComplete''Interaction Complete','Sep 5 2017 10:47AM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '149','1679696','41810','16','Talking''Call time','Sep 5 2017 10:47AM','agent2','3340','Talking' UNION ALL
    SELECT '150','1679664','41776','16','WrapUp''Wrap Time','Sep 5 2017 10:47AM','agent3','3363','WrapUp' UNION ALL
    SELECT '151','1679664','41776','16','InteractionComplete''Interaction Complete','Sep 5 2017 10:48AM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '152','1679701','41816','16','Talking''Call time','Sep 5 2017 10:48AM','agent3','3363','Talking' UNION ALL
    SELECT '153','1679600','41712','16','Talking''Call time','Sep 5 2017 10:49AM','agent1','3338','Talking' UNION ALL
    SELECT '154','1679600','41712','16','Hold''Hold','Sep 5 2017 10:49AM','agent1','3338','Hold' UNION ALL
    SELECT '155','1679696','41810','16','WrapUp''Wrap Time','Sep 5 2017 10:53AM','agent2','3340','WrapUp' UNION ALL
    SELECT '156','1679600','41712','16','Talking''Call time','Sep 5 2017 10:54AM','agent1','3338','Talking' UNION ALL
    SELECT '157','1679600','41712','16','Hold''Hold','Sep 5 2017 10:55AM','agent1','3338','Hold' UNION ALL
    SELECT '158','1679701','41816','16','WrapUp''Wrap Time','Sep 5 2017 10:55AM','agent3','3363','WrapUp' UNION ALL
    SELECT '159','1679701','41816','16','InteractionComplete''Interaction Complete','Sep 5 2017 10:55AM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '160','1679727','41843','16','Talking''Call time','Sep 5 2017 10:55AM','agent3','3363','Talking' UNION ALL
    SELECT '161','1679600','41712','16','Talking''Call time','Sep 5 2017 10:56AM','agent1','3338','Talking' UNION ALL
    SELECT '162','1679600','41712','16','WrapUp''Wrap Time','Sep 5 2017 11:00AM','agent1','3338','WrapUp' UNION ALL
    SELECT '163','1679600','41712','16','InteractionComplete''Interaction Complete','Sep 5 2017 11:00AM','agent1','3338','InteractionComplete' UNION ALL
    SELECT '164','1679696','41810','16','InteractionComplete''Interaction Complete','Sep 5 2017 11:02AM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '165','1679755','41870','16','Talking''Call time','Sep 5 2017 11:02AM','agent2','3340','Talking' UNION ALL
    SELECT '166','1679755','41870','16','WrapUp''Wrap Time','Sep 5 2017 11:04AM','agent2','3340','WrapUp' UNION ALL
    SELECT '167','1679755','41870','16','InteractionComplete''Interaction Complete','Sep 5 2017 11:04AM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '168','1679765','41880','16','Talking''Call time','Sep 5 2017 11:04AM','agent2','3340','Talking' UNION ALL
    SELECT '169','1679727','41843','16','WrapUp''Wrap Time','Sep 5 2017 11:08AM','agent3','3363','WrapUp' UNION ALL
    SELECT '170','1679727','41843','16','InteractionComplete''Interaction Complete','Sep 5 2017 11:08AM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '171','1679783','41899','16','Talking''Call time','Sep 5 2017 11:08AM','agent3','3363','Talking' UNION ALL
    SELECT '172','1679783','41899','16','WrapUp''Wrap Time','Sep 5 2017 11:09AM','agent3','3363','WrapUp' UNION ALL
    SELECT '173','1679783','41899','16','InteractionComplete''Interaction Complete','Sep 5 2017 11:09AM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '174','1679788','41903','16','Talking''Call time','Sep 5 2017 11:10AM','agent3','3363','Talking' UNION ALL
    SELECT '175','1679765','41880','16','WrapUp''Wrap Time','Sep 5 2017 11:13AM','agent2','3340','WrapUp' UNION ALL
    SELECT '176','1679765','41880','16','InteractionComplete''Interaction Complete','Sep 5 2017 11:14AM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '177','1679805','41920','16','Talking''Call time','Sep 5 2017 11:14AM','agent2','3340','Talking' UNION ALL
    SELECT '178','1679805','41920','16','Hold''Hold','Sep 5 2017 11:17AM','agent2','3340','Hold' UNION ALL
    SELECT '179','1679805','41920','16','Talking''Call time','Sep 5 2017 11:19AM','agent2','3340','Talking' UNION ALL
    SELECT '180','1679805','41920','16','Hold''Hold','Sep 5 2017 11:19AM','agent2','3340','Hold' UNION ALL
    SELECT '181','1679788','41903','16','WrapUp''Wrap Time','Sep 5 2017 11:21AM','agent3','3363','WrapUp' UNION ALL
    SELECT '182','1679788','41903','16','InteractionComplete''Interaction Complete','Sep 5 2017 11:21AM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '183','1679805','41920','16','WrapUp''Wrap Time','Sep 5 2017 11:21AM','agent2','3340','WrapUp' UNION ALL
    SELECT '184','1679805','41920','16','InteractionComplete''Interaction Complete','Sep 5 2017 11:22AM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '185','1679831','41945','16','Talking''Call time','Sep 5 2017 11:22AM','agent2','3340','Talking' UNION ALL
    SELECT '186','1679831','41945','16','Hold''Hold','Sep 5 2017 11:28AM','agent2','3340','Hold' UNION ALL
    SELECT '187','1679831','41945','16','Talking''Call time','Sep 5 2017 11:31AM','agent2','3340','Talking' UNION ALL
    SELECT '188','1679831','41945','16','WrapUp''Wrap Time','Sep 5 2017 11:34AM','agent2','3340','WrapUp' UNION ALL
    SELECT '189','1679831','41945','16','InteractionComplete''Interaction Complete','Sep 5 2017 11:34AM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '190','1679876','41991','16','Talking''Call time','Sep 5 2017 11:34AM','agent2','3340','Talking' UNION ALL
    SELECT '191','1679876','41991','16','WrapUp''Wrap Time','Sep 5 2017 11:36AM','agent2','3340','WrapUp' UNION ALL
    SELECT '192','1679876','41991','16','InteractionComplete''Interaction Complete','Sep 5 2017 11:36AM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '193','1679878','41992','16','Talking''Call time','Sep 5 2017 11:36AM','agent2','3340','Talking' UNION ALL
    SELECT '194','1679879','41993','16','Talking''Call time','Sep 5 2017 11:36AM','agent3','3363','Talking' UNION ALL
    SELECT '195','1679879','41993','16','Hold''Hold','Sep 5 2017 11:38AM','agent3','3363','Hold' UNION ALL
    SELECT '196','1679879','41993','16','WrapUp''Wrap Time','Sep 5 2017 11:39AM','agent3','3363','WrapUp' UNION ALL
    SELECT '197','1679879','41993','16','InteractionComplete''Interaction Complete','Sep 5 2017 11:39AM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '198','1679891','42004','16','Talking''Call time','Sep 5 2017 11:39AM','agent3','3363','Talking' UNION ALL
    SELECT '199','1679878','41992','16','WrapUp''Wrap Time','Sep 5 2017 11:41AM','agent2','3340','WrapUp' UNION ALL
    SELECT '200','1679878','41992','16','InteractionComplete''Interaction Complete','Sep 5 2017 11:43AM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '201','1679902','42015','16','Talking''Call time','Sep 5 2017 11:43AM','agent2','3340','Talking' UNION ALL
    SELECT '202','1679891','42004','16','WrapUp''Wrap Time','Sep 5 2017 11:44AM','agent3','3363','WrapUp' UNION ALL
    SELECT '203','1679891','42004','16','InteractionComplete''Interaction Complete','Sep 5 2017 11:44AM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '204','1679907','42020','16','Talking''Call time','Sep 5 2017 11:44AM','agent3','3363','Talking' UNION ALL
    SELECT '205','1679902','42015','16','WrapUp''Wrap Time','Sep 5 2017 11:46AM','agent2','3340','WrapUp' UNION ALL
    SELECT '206','1679902','42015','16','InteractionComplete''Interaction Complete','Sep 5 2017 11:46AM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '207','1679910','42023','16','Talking''Call time','Sep 5 2017 11:46AM','agent2','3340','Talking' UNION ALL
    SELECT '208','1679907','42020','16','WrapUp''Wrap Time','Sep 5 2017 11:49AM','agent3','3363','WrapUp' UNION ALL
    SELECT '209','1679907','42020','16','InteractionComplete''Interaction Complete','Sep 5 2017 11:50AM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '210','1679921','42034','16','Talking''Call time','Sep 5 2017 11:50AM','agent3','3363','Talking' UNION ALL
    SELECT '211','1679921','42034','16','WrapUp''Wrap Time','Sep 5 2017 11:51AM','agent3','3363','WrapUp' UNION ALL
    SELECT '212','1679921','42034','16','InteractionComplete''Interaction Complete','Sep 5 2017 11:51AM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '213','1679923','42036','16','Talking''Call time','Sep 5 2017 11:51AM','agent3','3363','Talking' UNION ALL
    SELECT '214','1679923','42036','16','WrapUp''Wrap Time','Sep 5 2017 11:54AM','agent3','3363','WrapUp' UNION ALL
    SELECT '215','1679923','42036','16','InteractionComplete''Interaction Complete','Sep 5 2017 11:55AM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '216','1679935','42048','16','Talking''Call time','Sep 5 2017 11:55AM','agent3','3363','Talking' UNION ALL
    SELECT '217','1679910','42023','16','WrapUp''Wrap Time','Sep 5 2017 11:56AM','agent2','3340','WrapUp' UNION ALL
    SELECT '218','1679910','42023','16','InteractionComplete''Interaction Complete','Sep 5 2017 11:56AM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '219','1679940','42053','16','Talking''Call time','Sep 5 2017 11:56AM','agent2','3340','Talking' UNION ALL
    SELECT '220','1679940','42053','16','Hold''Hold','Sep 5 2017 12:03PM','agent2','3340','Hold' UNION ALL
    SELECT '221','1679935','42048','16','WrapUp''Wrap Time','Sep 5 2017 12:03PM','agent3','3363','WrapUp' UNION ALL
    SELECT '222','1679935','42048','16','InteractionComplete''Interaction Complete','Sep 5 2017 12:04PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '223','1679953','42068','16','Talking''Call time','Sep 5 2017 12:04PM','agent3','3363','Talking' UNION ALL
    SELECT '224','1679940','42053','16','WrapUp''Wrap Time','Sep 5 2017 12:04PM','agent2','3340','WrapUp' UNION ALL
    SELECT '225','1679940','42053','16','InteractionComplete''Interaction Complete','Sep 5 2017 12:05PM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '226','1679955','42070','16','Talking''Call time','Sep 5 2017 12:05PM','agent2','3340','Talking' UNION ALL
    SELECT '227','1679955','42070','16','WrapUp''Wrap Time','Sep 5 2017 12:07PM','agent2','3340','WrapUp' UNION ALL
    SELECT '228','1679955','42070','16','InteractionComplete''Interaction Complete','Sep 5 2017 12:07PM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '229','1679964','42079','16','Talking''Call time','Sep 5 2017 12:07PM','agent2','3340','Talking' UNION ALL
    SELECT '230','1679953','42068','16','WrapUp''Wrap Time','Sep 5 2017 12:11PM','agent3','3363','WrapUp' UNION ALL
    SELECT '231','1679953','42068','16','InteractionComplete''Interaction Complete','Sep 5 2017 12:11PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '232','1679977','42093','16','Talking''Call time','Sep 5 2017 12:11PM','agent3','3363','Talking' UNION ALL
    SELECT '233','1679964','42079','16','Hold''Hold','Sep 5 2017 12:12PM','agent2','3340','Hold' UNION ALL
    SELECT '234','1679977','42093','16','Hold''Hold','Sep 5 2017 12:12PM','agent3','3363','Hold' UNION ALL
    SELECT '235','1679982','42098','16','Talking''Call time','Sep 5 2017 12:12PM','agent1','3338','Talking' UNION ALL
    SELECT '236','1679977','42093','16','WrapUp''Wrap Time','Sep 5 2017 12:13PM','agent3','3363','WrapUp' UNION ALL
    SELECT '237','1679977','42093','16','InteractionComplete''Interaction Complete','Sep 5 2017 12:13PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '238','1679983','42099','16','Talking''Call time','Sep 5 2017 12:13PM','agent3','3363','Talking' UNION ALL
    SELECT '239','1679964','42079','16','Talking''Call time','Sep 5 2017 12:14PM','agent2','3340','Talking' UNION ALL
    SELECT '240','1679982','42098','16','WrapUp''Wrap Time','Sep 5 2017 12:15PM','agent1','3338','WrapUp' UNION ALL
    SELECT '241','1679982','42098','16','InteractionComplete''Interaction Complete','Sep 5 2017 12:15PM','agent1','3338','InteractionComplete' UNION ALL
    SELECT '242','1679983','42099','16','WrapUp''Wrap Time','Sep 5 2017 12:19PM','agent3','3363','WrapUp' UNION ALL
    SELECT '243','1679983','42099','16','InteractionComplete''Interaction Complete','Sep 5 2017 12:20PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '244','1680001','42117','16','Talking''Call time','Sep 5 2017 12:20PM','agent3','3363','Talking' UNION ALL
    SELECT '245','1679964','42079','16','WrapUp''Wrap Time','Sep 5 2017 12:23PM','agent2','3340','WrapUp' UNION ALL
    SELECT '246','1679964','42079','16','InteractionComplete''Interaction Complete','Sep 5 2017 12:23PM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '247','1680001','42117','16','Hold''Hold','Sep 5 2017 12:26PM','agent3','3363','Hold' UNION ALL
    SELECT '248','1680001','42117','16','WrapUp''Wrap Time','Sep 5 2017 12:26PM','agent3','3363','WrapUp' UNION ALL
    SELECT '249','1680001','42117','16','InteractionComplete''Interaction Complete','Sep 5 2017 12:27PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '250','1680030','42146','16','Talking''Call time','Sep 5 2017 12:27PM','agent3','3363','Talking' UNION ALL
    SELECT '251','1680030','42146','16','WrapUp''Wrap Time','Sep 5 2017 12:29PM','agent3','3363','WrapUp' UNION ALL
    SELECT '252','1680030','42146','16','InteractionComplete''Interaction Complete','Sep 5 2017 12:30PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '253','1680039','42155','16','Talking''Call time','Sep 5 2017 12:30PM','agent3','3363','Talking' UNION ALL
    SELECT '254','1680039','42155','16','WrapUp''Wrap Time','Sep 5 2017 12:34PM','agent3','3363','WrapUp' UNION ALL
    SELECT '255','1680039','42155','16','InteractionComplete''Interaction Complete','Sep 5 2017 12:35PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '256','1680055','42171','16','Talking''Call time','Sep 5 2017 12:35PM','agent3','3363','Talking' UNION ALL
    SELECT '257','1680055','42171','16','Hold''Hold','Sep 5 2017 12:37PM','agent3','3363','Hold' UNION ALL
    SELECT '258','1680055','42171','16','WrapUp''Wrap Time','Sep 5 2017 12:39PM','agent3','3363','WrapUp' UNION ALL
    SELECT '259','1680055','42171','16','InteractionComplete''Interaction Complete','Sep 5 2017 12:40PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '260','1680072','42191','16','Talking''Call time','Sep 5 2017 12:40PM','agent3','3363','Talking' UNION ALL
    SELECT '261','1680072','42191','16','WrapUp''Wrap Time','Sep 5 2017 12:47PM','agent3','3363','WrapUp' UNION ALL
    SELECT '262','1680072','42191','16','InteractionComplete''Interaction Complete','Sep 5 2017 12:48PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '263','1680105','42225','16','Talking''Call time','Sep 5 2017 12:48PM','agent3','3363','Talking' UNION ALL
    SELECT '264','1680105','42225','16','WrapUp''Wrap Time','Sep 5 2017 12:52PM','agent3','3363','WrapUp' UNION ALL
    SELECT '265','1680105','42225','16','InteractionComplete''Interaction Complete','Sep 5 2017 12:53PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '266','1680121','42241','16','Talking''Call time','Sep 5 2017 12:53PM','agent3','3363','Talking' UNION ALL
    SELECT '267','1680128','42247','16','Talking''Call time','Sep 5 2017 12:54PM','agent2','3340','Talking' UNION ALL
    SELECT '268','1680128','42247','16','WrapUp''Wrap Time','Sep 5 2017 12:57PM','agent2','3340','WrapUp' UNION ALL
    SELECT '269','1680128','42247','16','InteractionComplete''Interaction Complete','Sep 5 2017 12:57PM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '270','1680135','42254','16','Talking''Call time','Sep 5 2017 12:57PM','agent2','3340','Talking' UNION ALL
    SELECT '271','1680121','42241','16','WrapUp''Wrap Time','Sep 5 2017 12:59PM','agent3','3363','WrapUp' UNION ALL
    SELECT '272','1680121','42241','16','InteractionComplete''Interaction Complete','Sep 5 2017 1:00PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '273','1680149','42268','16','Talking''Call time','Sep 5 2017 1:00PM','agent3','3363','Talking' UNION ALL
    SELECT '274','1680149','42268','16','WrapUp''Wrap Time','Sep 5 2017 1:04PM','agent3','3363','WrapUp' UNION ALL
    SELECT '275','1680149','42268','16','InteractionComplete''Interaction Complete','Sep 5 2017 1:05PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '276','1680166','42285','16','Talking''Call time','Sep 5 2017 1:05PM','agent3','3363','Talking' UNION ALL
    SELECT '277','1680135','42254','16','Hold''Hold','Sep 5 2017 1:05PM','agent2','3340','Hold' UNION ALL
    SELECT '278','1680166','42285','16','Hold''Hold','Sep 5 2017 1:07PM','agent3','3363','Hold' UNION ALL
    SELECT '279','1680135','42254','16','Talking''Call time','Sep 5 2017 1:08PM','agent2','3340','Talking' UNION ALL
    SELECT '280','1680166','42285','16','WrapUp''Wrap Time','Sep 5 2017 1:08PM','agent3','3363','WrapUp' UNION ALL
    SELECT '281','1680166','42285','16','InteractionComplete''Interaction Complete','Sep 5 2017 1:09PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '282','1680184','42304','16','Talking''Call time','Sep 5 2017 1:09PM','agent3','3363','Talking' UNION ALL
    SELECT '283','1680135','42254','16','Hold''Hold','Sep 5 2017 1:11PM','agent2','3340','Hold' UNION ALL
    SELECT '284','1680135','42254','16','Talking''Call time','Sep 5 2017 1:13PM','agent2','3340','Talking' UNION ALL
    SELECT '285','1680184','42304','16','WrapUp''Wrap Time','Sep 5 2017 1:13PM','agent3','3363','WrapUp' UNION ALL
    SELECT '286','1680135','42254','16','WrapUp''Wrap Time','Sep 5 2017 1:13PM','agent2','3340','WrapUp' UNION ALL
    SELECT '287','1680135','42254','16','InteractionComplete''Interaction Complete','Sep 5 2017 1:13PM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '288','1680201','42320','16','Talking''Call time','Sep 5 2017 1:13PM','agent2','3340','Talking' UNION ALL
    SELECT '289','1680184','42304','16','InteractionComplete''Interaction Complete','Sep 5 2017 1:13PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '290','1680202','42321','16','Talking''Call time','Sep 5 2017 1:13PM','agent3','3363','Talking' UNION ALL
    SELECT '291','1680202','42321','16','WrapUp''Wrap Time','Sep 5 2017 1:17PM','agent3','3363','WrapUp' UNION ALL
    SELECT '292','1680202','42321','16','InteractionComplete''Interaction Complete','Sep 5 2017 1:18PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '293','1680223','42342','16','Talking''Call time','Sep 5 2017 1:18PM','agent3','3363','Talking' UNION ALL
    SELECT '294','1680201','42320','16','WrapUp''Wrap Time','Sep 5 2017 1:19PM','agent2','3340','WrapUp' UNION ALL
    SELECT '295','1680201','42320','16','InteractionComplete''Interaction Complete','Sep 5 2017 1:19PM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '296','1680225','42344','16','Talking''Call time','Sep 5 2017 1:19PM','agent2','3340','Talking' UNION ALL
    SELECT '297','1680225','42344','16','Hold''Hold','Sep 5 2017 1:21PM','agent2','3340','Hold' UNION ALL
    SELECT '298','1680225','42344','16','Talking''Call time','Sep 5 2017 1:23PM','agent2','3340','Talking' UNION ALL
    SELECT '299','1680225','42344','16','Hold''Hold','Sep 5 2017 1:23PM','agent2','3340','Hold' UNION ALL
    SELECT '300','1680225','42344','16','Talking''Call time','Sep 5 2017 1:24PM','agent2','3340','Talking' UNION ALL
    SELECT '301','1680250','42371','16','Talking''Call time','Sep 5 2017 1:27PM','agent1','3338','Talking' UNION ALL
    SELECT '302','1680225','42344','16','WrapUp''Wrap Time','Sep 5 2017 1:29PM','agent2','3340','WrapUp' UNION ALL
    SELECT '303','1680250','42371','16','WrapUp''Wrap Time','Sep 5 2017 1:30PM','agent1','3338','WrapUp' UNION ALL
    SELECT '304','1680250','42371','16','InteractionComplete''Interaction Complete','Sep 5 2017 1:30PM','agent1','3338','InteractionComplete' UNION ALL
    SELECT '305','1680225','42344','16','InteractionComplete''Interaction Complete','Sep 5 2017 1:31PM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '306','1681927','42387','16','Talking''Call time','Sep 5 2017 1:31PM','agent2','3340','Talking' UNION ALL
    SELECT '307','1680223','42342','16','WrapUp''Wrap Time','Sep 5 2017 1:32PM','agent3','3363','WrapUp' UNION ALL
    SELECT '308','1680223','42342','16','InteractionComplete''Interaction Complete','Sep 5 2017 1:33PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '309','1681935','42397','16','Talking''Call time','Sep 5 2017 1:33PM','agent3','3363','Talking' UNION ALL
    SELECT '310','1681935','42397','16','WrapUp''Wrap Time','Sep 5 2017 1:37PM','agent3','3363','WrapUp' UNION ALL
    SELECT '311','1681935','42397','16','InteractionComplete''Interaction Complete','Sep 5 2017 1:38PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '312','1681953','42414','16','Talking''Call time','Sep 5 2017 1:38PM','agent3','3363','Talking' UNION ALL
    SELECT '313','1681927','42387','16','WrapUp''Wrap Time','Sep 5 2017 1:40PM','agent2','3340','WrapUp' UNION ALL
    SELECT '314','1681927','42387','16','InteractionComplete''Interaction Complete','Sep 5 2017 1:40PM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '315','1681958','42419','16','Talking''Call time','Sep 5 2017 1:40PM','agent2','3340','Talking' UNION ALL
    SELECT '316','1681953','42414','16','Hold''Hold','Sep 5 2017 1:41PM','agent3','3363','Hold' UNION ALL
    SELECT '317','1681953','42414','16','WrapUp''Wrap Time','Sep 5 2017 1:42PM','agent3','3363','WrapUp' UNION ALL
    SELECT '318','1681953','42414','16','InteractionComplete''Interaction Complete','Sep 5 2017 1:43PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '319','1681965','42427','16','Talking''Call time','Sep 5 2017 1:43PM','agent3','3363','Talking' UNION ALL
    SELECT '320','1681965','42427','16','WrapUp''Wrap Time','Sep 5 2017 1:46PM','agent3','3363','WrapUp' UNION ALL
    SELECT '321','1681965','42427','16','InteractionComplete''Interaction Complete','Sep 5 2017 1:46PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '322','1681979','42439','16','Talking''Call time','Sep 5 2017 1:47PM','agent3','3363','Talking' UNION ALL
    SELECT '323','1681958','42419','16','WrapUp''Wrap Time','Sep 5 2017 1:50PM','agent2','3340','WrapUp' UNION ALL
    SELECT '324','1681958','42419','16','InteractionComplete''Interaction Complete','Sep 5 2017 1:50PM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '325','1684483','42460','16','Talking''Call time','Sep 5 2017 1:51PM','agent2','3340','Talking' UNION ALL
    SELECT '326','1684483','42460','16','Hold''Hold','Sep 5 2017 1:53PM','agent2','3340','Hold' UNION ALL
    SELECT '327','1684483','42460','16','WrapUp''Wrap Time','Sep 5 2017 1:55PM','agent2','3340','WrapUp' UNION ALL
    SELECT '328','1681979','42439','16','WrapUp''Wrap Time','Sep 5 2017 2:05PM','agent3','3363','WrapUp' UNION ALL
    SELECT '329','1681979','42439','16','InteractionComplete''Interaction Complete','Sep 5 2017 2:06PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '330','1684483','42460','16','InteractionComplete''Interaction Complete','Sep 5 2017 2:01PM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '331','1706599','42581','16','Talking''Call time','Sep 5 2017 2:30PM','agent2','3340','Talking' UNION ALL
    SELECT '332','1706613','42593','16','Talking''Call time','Sep 5 2017 2:33PM','agent3','3363','Talking' UNION ALL
    SELECT '333','1706599','42581','16','WrapUp''Wrap Time','Sep 5 2017 2:34PM','agent2','3340','WrapUp' UNION ALL
    SELECT '334','1706599','42581','16','InteractionComplete''Interaction Complete','Sep 5 2017 2:34PM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '335','1706617','42597','16','Talking''Call time','Sep 5 2017 2:34PM','agent2','3340','Talking' UNION ALL
    SELECT '336','1706613','42593','16','Hold''Hold','Sep 5 2017 2:35PM','agent3','3363','Hold' UNION ALL
    SELECT '337','1706613','42593','16','WrapUp''Wrap Time','Sep 5 2017 2:36PM','agent3','3363','WrapUp' UNION ALL
    SELECT '338','1706613','42593','16','InteractionComplete''Interaction Complete','Sep 5 2017 2:36PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '339','1706630','42609','16','Talking''Call time','Sep 5 2017 2:36PM','agent3','3363','Talking' UNION ALL
    SELECT '340','1706630','42609','16','WrapUp''Wrap Time','Sep 5 2017 2:39PM','agent3','3363','WrapUp' UNION ALL
    SELECT '341','1706630','42609','16','InteractionComplete''Interaction Complete','Sep 5 2017 2:39PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '342','1706644','42627','16','Talking''Call time','Sep 5 2017 2:40PM','agent3','3363','Talking' UNION ALL
    SELECT '343','1706647','42630','16','Talking''Call time','Sep 5 2017 2:40PM','agent1','3338','Talking' UNION ALL
    SELECT '344','1706644','42627','16','WrapUp''Wrap Time','Sep 5 2017 2:41PM','agent3','3363','WrapUp' UNION ALL
    SELECT '345','1706644','42627','16','InteractionComplete''Interaction Complete','Sep 5 2017 2:41PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '346','1706650','42635','16','Talking''Call time','Sep 5 2017 2:41PM','agent3','3363','Talking' UNION ALL
    SELECT '347','1706647','42630','16','WrapUp''Wrap Time','Sep 5 2017 2:44PM','agent1','3338','WrapUp' UNION ALL
    SELECT '348','1706647','42630','16','InteractionComplete''Interaction Complete','Sep 5 2017 2:45PM','agent1','3338','InteractionComplete' UNION ALL
    SELECT '349','1706617','42597','16','WrapUp''Wrap Time','Sep 5 2017 2:46PM','agent2','3340','WrapUp' UNION ALL
    SELECT '350','1706650','42635','16','WrapUp''Wrap Time','Sep 5 2017 2:46PM','agent3','3363','WrapUp' UNION ALL
    SELECT '351','1706617','42597','16','InteractionComplete''Interaction Complete','Sep 5 2017 2:47PM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '352','1706650','42635','16','InteractionComplete''Interaction Complete','Sep 5 2017 2:47PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '353','1706675','42658','16','Talking''Call time','Sep 5 2017 2:47PM','agent2','3340','Talking' UNION ALL
    SELECT '354','1706676','42659','16','Talking''Call time','Sep 5 2017 2:47PM','agent3','3363','Talking' UNION ALL
    SELECT '355','1706675','42658','16','Hold''Hold','Sep 5 2017 2:50PM','agent2','3340','Hold' UNION ALL
    SELECT '356','1706676','42659','16','WrapUp''Wrap Time','Sep 5 2017 2:51PM','agent3','3363','WrapUp' UNION ALL
    SELECT '357','1706676','42659','16','InteractionComplete''Interaction Complete','Sep 5 2017 2:52PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '358','1706693','42675','16','Talking''Call time','Sep 5 2017 2:52PM','agent3','3363','Talking' UNION ALL
    SELECT '359','1706675','42658','16','WrapUp''Wrap Time','Sep 5 2017 2:52PM','agent2','3340','WrapUp' UNION ALL
    SELECT '360','1706675','42658','16','InteractionComplete''Interaction Complete','Sep 5 2017 2:53PM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '361','1706699','42681','16','Talking''Call time','Sep 5 2017 2:53PM','agent2','3340','Talking' UNION ALL
    SELECT '362','1706693','42675','16','Hold''Hold','Sep 5 2017 2:54PM','agent3','3363','Hold' UNION ALL
    SELECT '363','1706693','42675','16','WrapUp''Wrap Time','Sep 5 2017 2:55PM','agent3','3363','WrapUp' UNION ALL
    SELECT '364','1706693','42675','16','InteractionComplete''Interaction Complete','Sep 5 2017 2:55PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '365','1706708','42690','16','Talking''Call time','Sep 5 2017 2:55PM','agent3','3363','Talking' UNION ALL
    SELECT '366','1706699','42681','16','Hold''Hold','Sep 5 2017 2:56PM','agent2','3340','Hold' UNION ALL
    SELECT '367','1706708','42690','16','Hold''Hold','Sep 5 2017 2:57PM','agent3','3363','Hold' UNION ALL
    SELECT '368','1706699','42681','16','WrapUp''Wrap Time','Sep 5 2017 2:57PM','agent2','3340','WrapUp' UNION ALL
    SELECT '369','1706699','42681','16','InteractionComplete''Interaction Complete','Sep 5 2017 2:58PM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '370','1706716','42698','16','Talking''Call time','Sep 5 2017 2:58PM','agent2','3340','Talking' UNION ALL
    SELECT '371','1706708','42690','16','Talking''Call time','Sep 5 2017 3:01PM','agent3','3363','Talking' UNION ALL
    SELECT '372','1706708','42690','16','WrapUp''Wrap Time','Sep 5 2017 3:07PM','agent3','3363','WrapUp' UNION ALL
    SELECT '373','1706708','42690','16','InteractionComplete''Interaction Complete','Sep 5 2017 3:08PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '374','1706755','42738','16','Talking''Call time','Sep 5 2017 3:08PM','agent3','3363','Talking' UNION ALL
    SELECT '375','1706716','42698','16','WrapUp''Wrap Time','Sep 5 2017 3:11PM','agent2','3340','WrapUp' UNION ALL
    SELECT '376','1706755','42738','16','WrapUp''Wrap Time','Sep 5 2017 3:17PM','agent3','3363','WrapUp' UNION ALL
    SELECT '377','1706755','42738','16','InteractionComplete''Interaction Complete','Sep 5 2017 3:17PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '378','1706790','42773','16','Talking''Call time','Sep 5 2017 3:18PM','agent3','3363','Talking' UNION ALL
    SELECT '379','1706806','42789','16','Talking''Call time','Sep 5 2017 3:21PM','agent1','3338','Talking' UNION ALL
    SELECT '380','1706806','42789','16','Hold''Hold','Sep 5 2017 3:27PM','agent1','3338','Hold' UNION ALL
    SELECT '381','1706716','42698','16','InteractionComplete''Interaction Complete','Sep 5 2017 3:12PM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '382','1706790','42773','16','WrapUp''Wrap Time','Sep 5 2017 3:28PM','agent3','3363','WrapUp' UNION ALL
    SELECT '383','1706823','42806','16','Talking''Call time','Sep 5 2017 3:28PM','agent2','3340','Talking' UNION ALL
    SELECT '384','1706790','42773','16','InteractionComplete''Interaction Complete','Sep 5 2017 3:28PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '385','1706825','42808','16','Talking''Call time','Sep 5 2017 3:28PM','agent3','3363','Talking' UNION ALL
    SELECT '386','1706806','42789','16','Talking''Call time','Sep 5 2017 3:31PM','agent1','3338','Talking' UNION ALL
    SELECT '387','1706806','42789','16','Hold''Hold','Sep 5 2017 3:31PM','agent1','3338','Hold' UNION ALL
    SELECT '388','1706806','42789','16','Talking''Call time','Sep 5 2017 3:33PM','agent1','3338','Talking' UNION ALL
    SELECT '389','1706806','42789','16','WrapUp''Wrap Time','Sep 5 2017 3:35PM','agent1','3338','WrapUp' UNION ALL
    SELECT '390','1706806','42789','16','InteractionComplete''Interaction Complete','Sep 5 2017 3:35PM','agent1','3338','InteractionComplete' UNION ALL
    SELECT '391','1706825','42808','16','WrapUp''Wrap Time','Sep 5 2017 3:38PM','agent3','3363','WrapUp' UNION ALL
    SELECT '392','1706825','42808','16','InteractionComplete''Interaction Complete','Sep 5 2017 3:39PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '393','1706853','42836','16','Talking''Call time','Sep 5 2017 3:39PM','agent3','3363','Talking' UNION ALL
    SELECT '394','1706823','42806','16','WrapUp''Wrap Time','Sep 5 2017 3:42PM','agent2','3340','WrapUp' UNION ALL
    SELECT '395','1706823','42806','16','InteractionComplete''Interaction Complete','Sep 5 2017 3:42PM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '396','1706871','42854','16','Talking''Call time','Sep 5 2017 3:44PM','agent2','3340','Talking' UNION ALL
    SELECT '397','1706874','42857','16','Talking''Call time','Sep 5 2017 3:44PM','agent1','3338','Talking' UNION ALL
    SELECT '398','1706874','42857','16','Hold''Hold','Sep 5 2017 3:46PM','agent1','3338','Hold' UNION ALL
    SELECT '399','1706874','42857','16','Talking''Call time','Sep 5 2017 3:49PM','agent1','3338','Talking' UNION ALL
    SELECT '400','1706874','42857','16','Hold''Hold','Sep 5 2017 3:49PM','agent1','3338','Hold' UNION ALL
    SELECT '401','1706874','42857','16','WrapUp''Wrap Time','Sep 5 2017 3:50PM','agent1','3338','WrapUp' UNION ALL
    SELECT '402','1706871','42854','16','WrapUp''Wrap Time','Sep 5 2017 3:50PM','agent2','3340','WrapUp' UNION ALL
    SELECT '403','1706874','42857','16','InteractionComplete''Interaction Complete','Sep 5 2017 3:50PM','agent1','3338','InteractionComplete' UNION ALL
    SELECT '404','1706871','42854','16','InteractionComplete''Interaction Complete','Sep 5 2017 3:53PM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '405','1706904','42890','16','Talking''Call time','Sep 5 2017 3:54PM','agent2','3340','Talking' UNION ALL
    SELECT '406','1706853','42836','16','WrapUp''Wrap Time','Sep 5 2017 3:54PM','agent3','3363','WrapUp' UNION ALL
    SELECT '407','1706853','42836','16','InteractionComplete''Interaction Complete','Sep 5 2017 3:54PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '408','1706904','42890','16','Hold''Hold','Sep 5 2017 4:02PM','agent2','3340','Hold' UNION ALL
    SELECT '409','1706956','42940','16','Talking''Call time','Sep 5 2017 4:03PM','agent1','3338','Talking' UNION ALL
    SELECT '410','1706904','42890','16','Talking''Call time','Sep 5 2017 4:04PM','agent2','3340','Talking' UNION ALL
    SELECT '411','1706904','42890','16','Hold''Hold','Sep 5 2017 4:04PM','agent2','3340','Hold' UNION ALL
    SELECT '412','1706904','42890','16','Talking''Call time','Sep 5 2017 4:05PM','agent2','3340','Talking' UNION ALL
    SELECT '413','1706956','42940','16','WrapUp''Wrap Time','Sep 5 2017 4:07PM','agent1','3338','WrapUp' UNION ALL
    SELECT '414','1706956','42940','16','InteractionComplete''Interaction Complete','Sep 5 2017 4:07PM','agent1','3338','InteractionComplete' UNION ALL
    SELECT '415','1706982','42966','16','Talking''Call time','Sep 5 2017 4:09PM','agent3','3363','Talking' UNION ALL
    SELECT '416','1706982','42966','16','WrapUp''Wrap Time','Sep 5 2017 4:16PM','agent3','3363','WrapUp' UNION ALL
    SELECT '417','1706982','42966','16','InteractionComplete''Interaction Complete','Sep 5 2017 4:16PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '418','1707003','42988','16','Talking''Call time','Sep 5 2017 4:16PM','agent3','3363','Talking' UNION ALL
    SELECT '419','1706904','42890','16','WrapUp''Wrap Time','Sep 5 2017 4:18PM','agent2','3340','WrapUp' UNION ALL
    SELECT '420','1706904','42890','16','InteractionComplete''Interaction Complete','Sep 5 2017 4:18PM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '421','1707009','42994','16','Talking''Call time','Sep 5 2017 4:18PM','agent2','3340','Talking' UNION ALL
    SELECT '422','1707003','42988','16','WrapUp''Wrap Time','Sep 5 2017 4:27PM','agent3','3363','WrapUp' UNION ALL
    SELECT '423','1707003','42988','16','InteractionComplete''Interaction Complete','Sep 5 2017 4:27PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '424','1707039','43025','16','Talking''Call time','Sep 5 2017 4:27PM','agent3','3363','Talking' UNION ALL
    SELECT '425','1707039','43025','16','Hold''Hold','Sep 5 2017 4:28PM','agent3','3363','Hold' UNION ALL
    SELECT '426','1707039','43025','16','WrapUp''Wrap Time','Sep 5 2017 4:30PM','agent3','3363','WrapUp' UNION ALL
    SELECT '427','-1','43030','-1','ExitApplication''Application Close','Sep 5 2017 4:30PM','agent1','3338','ExitApplication' UNION ALL
    SELECT '428','1707039','43025','16','InteractionComplete''Interaction Complete','Sep 5 2017 4:30PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '429','1707046','43034','16','Talking''Call time','Sep 5 2017 4:30PM','agent3','3363','Talking' UNION ALL
    SELECT '430','1707009','42994','16','WrapUp''Wrap Time','Sep 5 2017 4:34PM','agent2','3340','WrapUp' UNION ALL
    SELECT '431','1707009','42994','16','InteractionComplete''Interaction Complete','Sep 5 2017 4:35PM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '432','1707046','43034','16','WrapUp''Wrap Time','Sep 5 2017 4:35PM','agent3','3363','WrapUp' UNION ALL
    SELECT '433','1707066','43063','16','Talking''Call time','Sep 5 2017 4:35PM','agent2','3340','Talking' UNION ALL
    SELECT '434','1707046','43034','16','InteractionComplete''Interaction Complete','Sep 5 2017 4:36PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '435','1707069','43067','16','Talking''Call time','Sep 5 2017 4:36PM','agent3','3363','Talking' UNION ALL
    SELECT '436','1707066','43063','16','WrapUp''Wrap Time','Sep 5 2017 4:38PM','agent2','3340','WrapUp' UNION ALL
    SELECT '437','1707066','43063','16','InteractionComplete''Interaction Complete','Sep 5 2017 4:39PM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '438','1707079','43079','16','Talking''Call time','Sep 5 2017 4:39PM','agent2','3340','Talking' UNION ALL
    SELECT '439','1707069','43067','16','WrapUp''Wrap Time','Sep 5 2017 4:40PM','agent3','3363','WrapUp' UNION ALL
    SELECT '440','1707069','43067','16','InteractionComplete''Interaction Complete','Sep 5 2017 4:42PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '441','1707088','43089','16','Talking''Call time','Sep 5 2017 4:42PM','agent3','3363','Talking' UNION ALL
    SELECT '442','1707079','43079','16','Hold''Hold','Sep 5 2017 4:42PM','agent2','3340','Hold' UNION ALL
    SELECT '443','1707079','43079','16','Talking''Call time','Sep 5 2017 4:45PM','agent2','3340','Talking' UNION ALL
    SELECT '444','1707088','43089','16','WrapUp''Wrap Time','Sep 5 2017 4:45PM','agent3','3363','WrapUp' UNION ALL
    SELECT '445','1707088','43089','16','InteractionComplete''Interaction Complete','Sep 5 2017 4:46PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '446','1707099','43099','16','Talking''Call time','Sep 5 2017 4:46PM','agent3','3363','Talking' UNION ALL
    SELECT '447','1707099','43099','16','WrapUp''Wrap Time','Sep 5 2017 4:49PM','agent3','3363','WrapUp' UNION ALL
    SELECT '448','1707099','43099','16','InteractionComplete''Interaction Complete','Sep 5 2017 4:49PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '449','1707106','43107','16','Talking''Call time','Sep 5 2017 4:49PM','agent3','3363','Talking' UNION ALL
    SELECT '450','1707079','43079','16','WrapUp''Wrap Time','Sep 5 2017 4:52PM','agent2','3340','WrapUp' UNION ALL
    SELECT '451','1707106','43107','16','WrapUp''Wrap Time','Sep 5 2017 4:53PM','agent3','3363','WrapUp' UNION ALL
    SELECT '452','1707106','43107','16','InteractionComplete''Interaction Complete','Sep 5 2017 4:54PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '453','1707122','43123','16','Talking''Call time','Sep 5 2017 4:54PM','agent3','3363','Talking' UNION ALL
    SELECT '454','1707079','43079','16','InteractionComplete''Interaction Complete','Sep 5 2017 4:55PM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '455','1707128','43130','16','Talking''Call time','Sep 5 2017 4:56PM','agent2','3340','Talking' UNION ALL
    SELECT '456','1707122','43123','16','WrapUp''Wrap Time','Sep 5 2017 4:59PM','agent3','3363','WrapUp' UNION ALL
    SELECT '457','1707122','43123','16','InteractionComplete''Interaction Complete','Sep 5 2017 5:00PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '458','1707142','43144','16','Talking''Call time','Sep 5 2017 5:00PM','agent3','3363','Talking' UNION ALL
    SELECT '459','1707128','43130','16','Hold''Hold','Sep 5 2017 5:00PM','agent2','3340','Hold' UNION ALL
    SELECT '460','1707128','43130','16','Talking''Call time','Sep 5 2017 5:05PM','agent2','3340','Talking' UNION ALL
    SELECT '461','1707128','43130','16','Hold''Hold','Sep 5 2017 5:05PM','agent2','3340','Hold' UNION ALL
    SELECT '462','1707128','43130','16','Talking''Call time','Sep 5 2017 5:05PM','agent2','3340','Talking' UNION ALL
    SELECT '463','1707142','43144','16','WrapUp''Wrap Time','Sep 5 2017 5:05PM','agent3','3363','WrapUp' UNION ALL
    SELECT '464','1707142','43144','16','InteractionComplete''Interaction Complete','Sep 5 2017 5:06PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '465','1707161','43163','16','Talking''Call time','Sep 5 2017 5:06PM','agent3','3363','Talking' UNION ALL
    SELECT '466','1707128','43130','16','WrapUp''Wrap Time','Sep 5 2017 5:08PM','agent2','3340','WrapUp' UNION ALL
    SELECT '467','1707128','43130','16','InteractionComplete''Interaction Complete','Sep 5 2017 5:08PM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '468','1707166','43168','16','Talking''Call time','Sep 5 2017 5:08PM','agent2','3340','Talking' UNION ALL
    SELECT '469','1707161','43163','16','WrapUp''Wrap Time','Sep 5 2017 5:09PM','agent3','3363','WrapUp' UNION ALL
    SELECT '470','1707161','43163','16','InteractionComplete''Interaction Complete','Sep 5 2017 5:09PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '471','1707170','43171','16','Talking''Call time','Sep 5 2017 5:09PM','agent3','3363','Talking' UNION ALL
    SELECT '472','1707166','43168','16','WrapUp''Wrap Time','Sep 5 2017 5:13PM','agent2','3340','WrapUp' UNION ALL
    SELECT '473','1707166','43168','16','InteractionComplete''Interaction Complete','Sep 5 2017 5:13PM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '474','1707180','43181','16','Talking''Call time','Sep 5 2017 5:13PM','agent2','3340','Talking' UNION ALL
    SELECT '475','1707180','43181','16','WrapUp''Wrap Time','Sep 5 2017 5:20PM','agent2','3340','WrapUp' UNION ALL
    SELECT '476','1707170','43171','16','WrapUp''Wrap Time','Sep 5 2017 5:20PM','agent3','3363','WrapUp' UNION ALL
    SELECT '477','1707180','43181','16','InteractionComplete''Interaction Complete','Sep 5 2017 5:20PM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '478','1707199','43202','16','Talking''Call time','Sep 5 2017 5:21PM','agent2','3340','Talking' UNION ALL
    SELECT '479','1707170','43171','16','InteractionComplete''Interaction Complete','Sep 5 2017 5:21PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '480','1707202','43205','16','Talking''Call time','Sep 5 2017 5:21PM','agent3','3363','Talking' UNION ALL
    SELECT '481','1707202','43205','16','WrapUp''Wrap Time','Sep 5 2017 5:22PM','agent3','3363','WrapUp' UNION ALL
    SELECT '482','1707202','43205','16','InteractionComplete''Interaction Complete','Sep 5 2017 5:22PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '483','1707208','43211','16','Talking''Call time','Sep 5 2017 5:22PM','agent3','3363','Talking' UNION ALL
    SELECT '484','1707199','43202','16','WrapUp''Wrap Time','Sep 5 2017 5:25PM','agent2','3340','WrapUp' UNION ALL
    SELECT '485','1707199','43202','16','InteractionComplete''Interaction Complete','Sep 5 2017 5:25PM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '486','1707216','43218','16','Talking''Call time','Sep 5 2017 5:25PM','agent2','3340','Talking' UNION ALL
    SELECT '487','1707208','43211','16','WrapUp''Wrap Time','Sep 5 2017 5:26PM','agent3','3363','WrapUp' UNION ALL
    SELECT '488','1707208','43211','16','InteractionComplete''Interaction Complete','Sep 5 2017 5:26PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '489','1707218','43220','16','Talking''Call time','Sep 5 2017 5:26PM','agent3','3363','Talking' UNION ALL
    SELECT '490','1707216','43218','16','WrapUp''Wrap Time','Sep 5 2017 5:30PM','agent2','3340','WrapUp' UNION ALL
    SELECT '491','1707216','43218','16','InteractionComplete''Interaction Complete','Sep 5 2017 5:30PM','agent2','3340','InteractionComplete' UNION ALL
    SELECT '492','-1','43237','-1','ExitApplication''Application Close','Sep 5 2017 5:30PM','agent2','3340','ExitApplication' UNION ALL
    SELECT '493','1707218','43220','16','WrapUp''Wrap Time','Sep 5 2017 5:37PM','agent3','3363','WrapUp' UNION ALL
    SELECT '494','1707218','43220','16','InteractionComplete''Interaction Complete','Sep 5 2017 5:37PM','agent3','3363','InteractionComplete' UNION ALL
    SELECT '495','-1','43266','-1','ExitApplication''Application Close','Sep 5 2017 5:37PM','agent3','3363','ExitApplication'

  • Could you provide a CREATE statement for your sample data please?

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Hi Thom A,

    Do you mean the Create script for the table hosting the data?

    if so please see below:

    /****** Object: Table [dbo].[CALLSTATUSLOGGING]  Script Date: 06/10/2017 16:52:33 ******/
    SET ANSI_NULLS ON
    GO

    SET QUOTED_IDENTIFIER ON
    GO

    SET ANSI_PADDING ON
    GO

    CREATE TABLE [dbo].[CALLSTATUSLOGGING](
        [CALLSTATID] [int] IDENTITY(1,1) NOT NULL,
        [CLIENTNO] [int] NULL,
        [CALLLOGID] [int] NULL,
        [CPGNO] [int] NULL,
        [CALLSTATE] [varchar](200) NULL,
        [LOCALISEDCALLSTATE] [nvarchar](200) NULL,
        [STATETIMEAGT] [datetime] NULL,
        [USEDBYAGENT] [varchar](30) NULL,
        [LOGAGENTNO] [int] NULL,
        [CALLLOGREF] [varchar](50) NULL,
        [COMPLETECODE] [varchar](10) NULL,
        [CTI_USER] [varchar](20) NULL,
    PRIMARY KEY CLUSTERED
    (
        [CALLSTATID] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]

    GO

    SET ANSI_PADDING OFF
    GO

Viewing 15 posts - 1 through 15 (of 23 total)

You must be logged in to reply to this topic. Login to reply