brycecaruthers
5/16/2017 - 4:18 PM

The query below will pull all calls since the entered date for the selected lskin broken down by day, total calls, and unique calls

The query below will pull all calls since the entered date for the selected lskin broken down by day, total calls, and unique calls

SELECT s.tz_date, COUNT(DISTINCT(s.callid)) 'Total Calls', COUNT(DISTINCT(p.ani)) 'Unique Callers'
FROM vwXCall_ShortLong s
	JOIN vwXCall_ShortLong_Platform p ON p.frn_callid = s.callid
	JOIN dnis d ON d.lednis = p.dnis
WHERE d.add_lskinid = 76164
	AND tz_date >= '2017-05-06'
  GROUP BY s.tz_date
ORDER BY tz_date desc