Avaya Support Forums

Avaya Support Forums (http://support.avaya.com/forums/index.php)
-   Contact Center Applications (http://support.avaya.com/forums/forumdisplay.php?f=3)
-   -   AACC 6.4, SQL statement (http://support.avaya.com/forums/showthread.php?t=6213)

lnesje 03-25-2015 04:46 AM

AACC 6.4, SQL statement
 
From Contact summary report, to find repeated callers in a period is very manual job.

Could anyone share the SQL statement to use for where the originator > 1 last 7 days ?

To be able to count how many times the same number has called, in a period
count originator number calling, if more than 1, list, period = last 7 days.

thanks

hergenmuelle 03-26-2015 03:31 AM

One way to do that:
select Originator, CountOf from (select distinct Originator, count(Originator) as CountOf from dbo.eCSRStat WHERE {fn TIMESTAMPDIFF(SQL_TSI_HOUR,LastTreatmentStamp, CURRENT_TIMESTAMP)} <= 700 group by Originator ) where CountOf > 1

=> show all Originators occurring more than once within the last 700 hours.
This is just an example and can be enhanced if required.


All times are GMT -7. The time now is 03:25 AM.