<div dir="auto"><div><a href="https://dev.mysql.com/doc/refman/8.0/en/group-by-functions.html#function_count-distinct">https://dev.mysql.com/doc/refman/8.0/en/group-by-functions.html#function_count-distinct</a></div><div dir="auto"><br></div><div dir="auto">Use something like count(distinct src) instead of count(*)</div><div dir="auto"><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Tue, Nov 12, 2019, 07:35 Andre Gronwald <<a href="mailto:andregronwald78@gmail.com">andregronwald78@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">hi,<br>
<br>
we want to extract the information when the most callers are entering <br>
our phone system based on an interval of 15 minutes. this is quite <br>
simple (although not perfect) with<br>
select calldate, count(*) as anzahl from cdr where calldate > <br>
'2019-10-12' group by unix_timestamp(calldate) DIV 900 having ;<br>
<br>
Unfortunately we have lots of callers who calls multiple times when they <br>
are forwarded to a queue instead of being answered by a human <br>
immediately. But to know when we need more people I want to count same <br>
caller-ids within an interval as one call.<br>
<br>
Any ideas how to do this?<br>
<br>
kind regards,<br>
andre<br>
<br>
-- <br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
Check out the new Asterisk community forum at: <a href="https://community.asterisk.org/" rel="noreferrer noreferrer" target="_blank">https://community.asterisk.org/</a><br>
<br>
New to Asterisk? Start here:<br>
      <a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" rel="noreferrer noreferrer" target="_blank">https://wiki.asterisk.org/wiki/display/AST/Getting+Started</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" rel="noreferrer noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a></blockquote></div></div></div>