![]() |
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 |
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 06:32 PM. |