I am using this expression:
SELECT DATE(calldate) as Data,COUNT(clid) as Registros,dst as Tronco
FROM cdr WHERE dst=55008133070000
AND calldate BETWEEN '2012-10-01' AND '2012-10-15'
GROUP BY DATE(calldate), clid HAVING COUNT(clid) > 1 ORDER BY Data DESC
Date---------Total------ Trunk
2012-10-11 3 55008133070000
2012-10-11 2 55008133070000
2012-10-11 3 55008133070000
2012-10-10 2 55008133070000
2012-10-10 2 55008133070000
2012-10-10 2 55008133070000
2012-10-09 3 55008133070000
2012-10-09 2 55008133070000
2012-10-09 2 55008133070000
2012-10-09 3 55008133070000
2012-10-09 5 55008133070000
2012-10-09 5 55008133070000
However, needs to be shown the amount of times that day repeated.
Date---------Total------ Trunk
2012-10-11 3 55008133070000
2012-10-10 3 55008133070000
2012-10-09 6 55008133070000
Any suggestions?
EDITED due OP comment:
You should group by
dstand not byclid, also count for distinct destination number, see GROUP BY clause and COUNT: