Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8690081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:49:31+00:00 2026-06-12T23:49:31+00:00

I am using this expression: SELECT DATE(calldate) as Data,COUNT(clid) as Registros,dst as Tronco FROM

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T23:49:32+00:00Added an answer on June 12, 2026 at 11:49 pm

    EDITED due OP comment:

    You should group by dst and not by clid, also count for distinct destination number, see GROUP BY clause and COUNT:

    SELECT DATE(calldate) as Data,COUNT( distinct 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),  dst 
    HAVING COUNT(distinct clid) > 1 ORDER BY Data DESC
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using this expression to convert a date at UTC to its US/Eastern time
I'm trying to generate this basic SQL statement using Query Expressions: SELECT * FROM
I want to match D11-RONPLAYER_DEF_15_PO using this regular expression: D\[0-9]+-\[A-Z]*PLAYER_(DEF\[0-9]*)_(\[^_]+)_ but it does not
I am trying to achieve this using Expression Blend 3. I need that every
How do I, using a regular expression , split this string : string =
Using this C# application pick a start and ending date range, that SAP will
Under the my query.I select this way all job count by fullname. SELECT COUNT(sy.FullName)
How to make this expression using the methods of exptension, but (!) not using
running this code: public bool CheckTime(DateTime date, int UserID, int TotalTimeMin) { using (var
Suppose In SQL I am trying to run this query Select * from MyTable

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.