https://dev.mysql.com/doc/refman/8.0/en/group-by-functions.html#function_count-distinct

Use something like count(distinct src) instead of count(*)

On Tue, Nov 12, 2019, 07:35 Andre Gronwald <andregronwal...@gmail.com>
wrote:

> hi,
>
> we want to extract the information when the most callers are entering
> our phone system based on an interval of 15 minutes. this is quite
> simple (although not perfect) with
> select calldate, count(*) as anzahl from cdr where calldate >
> '2019-10-12' group by unix_timestamp(calldate) DIV 900 having ;
>
> Unfortunately we have lots of callers who calls multiple times when they
> are forwarded to a queue instead of being answered by a human
> immediately. But to know when we need more people I want to count same
> caller-ids within an interval as one call.
>
> Any ideas how to do this?
>
> kind regards,
> andre
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
>
> New to Asterisk? Start here:
>       https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
      https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to