brycecaruthers
6/7/2017 - 4:24 PM

This query needs some tweaking, but basically, will pull calls for smart routing and see when the call was placed vs when the smart routing

This query needs some tweaking, but basically, will pull calls for smart routing and see when the call was placed vs when the smart routing record was created.

SELECT *--d.isoutbound, p.frn_callid, p.ani, p.dnis, p.dc_dialstring, d.label1, p.call_begin_datetime, a.created
FROM vwXCall_ShortLong_Platform p
	JOIN dnis d ON d.lednis = p.dnis
	JOIN affectation a ON a.criteria_animatch = p.ani
WHERE d.add_lskinid = 5069
	AND p.call_begin_datetime >= '2017-05-31'
	AND d.label1 LIKE '%utboun%'
ORDER BY p.ani, p.call_begin_datetime