![]() ![]() |
#1
|
|||
|
|||
![]()
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 |
#2
|
|||
|
|||
![]()
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. |
![]() |
Tags |
aacc, database, originator, sql |
Thread Tools | Search this Thread |
Display Modes | |
|
|