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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:28:32+00:00 2026-06-11T07:28:32+00:00

I have this query below: Select count(CDT) as Actions From Player_Tapjoy Where Trunc(CDT) >=

  • 0

I have this query below:

Select
count(CDT) as Actions
From Player_Tapjoy
Where
Trunc(CDT) >= To_Date('2012-sep-01','yyyy-mon-dd')
And Trunc(CDT) < To_Date('2012-sep-12','yyyy-mon-dd')
Union All
Select 
Count(CDT) As Actions
From Player_aux_pt
Where
Site = 'AppCircle' And
Trunc(CDT) >= To_Date('2012-sep-01','yyyy-mon-dd')
And Trunc(CDT) < To_Date('2012-sep-12','yyyy-mon-dd')

This output gives me two rows, one for each of the select functions. How can I combine these to get the sum of the two select functions? And on top of that, how do I group it by CDT (the date)?

  • 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-11T07:28:33+00:00Added an answer on June 11, 2026 at 7:28 am

    I think you’re looking for something like this, with the grouping by date:

    select cdt, sum(actions) as actions_sum
        from (  select trunc(cdt) as cdt, count(cdt) as actions
                  from player_tapjoy
                 where trunc(cdt) >= to_date('2012-sep-01', 'yyyy-mon-dd') and
                       trunc(cdt) < to_date('2012-sep-12', 'yyyy-mon-dd')
              group by trunc(cdt)
              union all
                select trunc(cdt) as cdt, count(cdt) as actions
                  from player_aux_pt
                 where site = 'AppCircle' and
                       trunc(cdt) >= to_date('2012-sep-01', 'yyyy-mon-dd') and
                       trunc(cdt) < to_date('2012-sep-12', 'yyyy-mon-dd')
              group by trunc(cdt))
    group by cdt
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written this query for retrieving data from mysql as below select FeedbackCode,EMailID,FeedbackDetail,
Have this query: SELECT HOUR( DATE ) AS hr, COUNT( * ) AS cnt
I have this query... SELECT Distinct([TargetAttributeID]) FROM (SELECT distinct att1.intAttributeID as [TargetAttributeID] FROM AST_tblAttributes
i have this query: SELECT `completed`.`ID` AS `ID`,`completed`.`level` AS `level`,`completed`.`completed_in` AS `completed_in`, COUNT(1) AS
I have a query that spits out a result: Select Sum(Count(P.Create_Dtime)), From Player P
I have this query select movie_name, user_name from movie natural join movie_queue natural join
I have a query like this select Count(1) as Count, pt.Name as TypeName, pt.ID
I have a query like this: select author1 from books_group where category='cse' union select
I have below query I am trying to show message 'No SubSource for this
I have this query SELECT zip, ( 3959 * acos( cos( radians(34.12520) ) *

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.