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 8639739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T11:05:50+00:00 2026-06-12T11:05:50+00:00

Here is mysql query SELECT CallDate,SUM(Hour0) AS FailedCalls FROM call_status WHERE CallDate=’2012-09-14′ AND CallStatusId

  • 0

Here is mysql query

SELECT CallDate,SUM(Hour0) AS FailedCalls FROM call_status WHERE CallDate='2012-09-14' AND CallStatusId NOT IN (42,52)

UNION

SELECT CallDate,SUM(Hour0) AS SuccessCalls FROM call_status WHERE CallDate='2012-09-14' AND CallStatusId IN (42,52);

Here is the output
enter image description here

Sorry for the small image.
As you can see i have selected Failed Calls from above query and SuccessCalls using second query.But what i want is CallDate,FailedCalls,SuccessCalls in a single row.

Update:
Here is the correct query:

SELECT CallDate,
SUM(CASE WHEN (CallStatusId NOT IN(42,52)) THEN Hour0
ELSE 0 
END) AS FailedCalls,
SUM(CASE WHEN (CallStatusId IN (42,52)) THEN Hour0
ELSE 0
END) AS SuccessCalls
FROM call_status
WHERE CallDate='2012-09-14';
  • 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-12T11:05:51+00:00Added an answer on June 12, 2026 at 11:05 am

    Something along these lines?

    SELECT CallDate
          ,SUM( CASE WHEN (Hour0 != 42 AND Hour0 != 52) THEN 1 ELSE 0 END ) AS FailedCalls
          ,SUM( CASE WHEN (Hour0  = 42  OR Hour0  = 52) THEN 1 ELSE 0 END ) AS SuccessCalls
      FROM call_status
      WHERE CallDate='2012-09-14'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is my mySQL query: SELECT * FROM `eodList` WHERE datechanged>='$curdate' GROUP BY symbolName
Here is my mysql query SELECT IntervalStartTime,IFNULL(SUM(AbandonedCalls),0) AS AbandonedCallSum,SUM(QueueTime) AS QTS,SUM(RingTime) AS RTS, IFNULL(SUM(AnsweredCalls),0)
Here is my mysql query SELECT network_mst.NetworkId,network_mst.NetworkName,network_mst.InternationalDBStatus,network_mst.Of fshoreDBStatus,network_mst.InterDBStatus,network_mst.IntraDBStatus FROM network_mst INNER JOIN carrier_network ON
Here is my MySQL query: SELECT name FROM table; How can I also select
Here is my Mysql query SELECT COUNT(*) CallCnt,ANBCnt, t2.Duration,(ANB) Number, ((DATE_SUB('2012-12-10 05:22:30', INTERVAL (SELECT
I am having trouble getting well formatted results from my mysql query. Here is
here is my code for the query in php: $query3 = mysql_query(SELECT * FROM
The following MySQL query: select `userID` as uID, (select `siteID` from `users` where `userID`
I have the following MySQL query: SELECT Project.*, `trk_deleted`, `trk_status`, `trk_state` FROM `project` AS
Here is the below Code: $query = mysql_query(SELECT * FROM tablex); if ($result =

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.