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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:24:04+00:00 2026-06-12T01:24:04+00:00

I have this large query below which I joined five queries by the date:

  • 0

I have this large query below which I joined five queries by the date:

--Combined Daily Actions Per Revenue Source-- 
SELECT Two.the_date, 
       sp_dau, 
       cs_dau, 
       tapjoy_ios_dau, 
       tapjoy_android_dau, 
       appcircle_ios_dau, 
       appcircle_android_dau, 
       freecause_dau, 
       portal_dau 
FROM   (SELECT Trunc(Cs.create_dtime) AS The_Date, 
               Count(DISTINCT CASE 
                                WHEN Cs.cs_listing_id LIKE '99999999%' THEN 
                                ( Cs.player_id ) 
                              END)    AS Sp_Dau, 
               Count(DISTINCT CASE 
                                WHEN Cs.cs_listing_id NOT LIKE '99999999%' THEN 
                                ( Cs.player_id ) 
                              END)    AS Cs_Dau 
        FROM   player_chkin_cs Cs 
        WHERE  Trunc(Cs.create_dtime) >= To_date('2012-Jan-01', 'yyyy-mon-dd') 
        GROUP  BY Trunc(Cs.create_dtime)) One 
       INNER JOIN (SELECT Trunc(Tap.create_dtime) AS The_Date, 
                          Count(DISTINCT CASE 
                                           WHEN ( Play.uuid LIKE 'i~%' ) 
                                                 OR ( Play.uuid LIKE 'ti~%' ) 
                                         THEN 
                                           Tap.player_id 
                                         END)     AS Tapjoy_Ios_Dau, 
                          Count(DISTINCT CASE 
                                           WHEN ( Play.uuid LIKE 'a~%' ) 
                                                 OR ( Play.uuid LIKE 'ta~%' ) 
                                         THEN 
                                           Tap.player_id 
                                         END)     AS Tapjoy_Android_DAU 
                   FROM   player_tapjoy Tap 
                          INNER JOIN player Play 
                                  ON Tap.player_id = Play.player_id 
                   WHERE  Trunc(Tap.create_dtime) >= 
                          To_date('2012-Jan-01', 'yyyy-mon-dd') 
                   GROUP  BY Trunc(Tap.create_dtime)) Two 
               ON One.the_date = Two.the_date 
       INNER JOIN (SELECT Trunc(Aux.create_dtime) AS The_Date, 
                          Count(DISTINCT CASE 
                                           WHEN ( Play.uuid LIKE 'i~%' ) 
                                                 OR ( Play.uuid LIKE 'ti~%' ) 
                                         THEN 
                                           Aux.player_id 
                                         END)     AS Appcircle_Ios_Dau, 
                          Count(DISTINCT CASE 
                                           WHEN ( Play.uuid LIKE 'a~%' ) 
                                                 OR ( Play.uuid LIKE 'ta~%' ) 
                                         THEN 
                                           Aux.player_id 
                                         END)     AS AppCircle_Android_DAU 
                   FROM   player_aux_pt Aux 
                          INNER JOIN player Play 
                                  ON Aux.player_id = Play.player_id 
                   WHERE  Aux.site = 'AppCircle' 
                          AND Trunc(Aux.create_dtime) >= 
                              To_date('2012-Jan-01', 'yyyy-mon-dd') 
                   GROUP  BY Trunc(Aux.create_dtime))Three 
               ON Two.the_date = Three.the_date 
       INNER JOIN (SELECT Trunc(Aux.create_dtime)       AS The_Date, 
                          Count(DISTINCT Aux.player_id) AS FreeCause_DAU 
                   FROM   player_aux_pt Aux 
                   WHERE  Aux.site = 'ext : freecause' 
                          AND Trunc(Aux.create_dtime) >= 
                              To_date('2012-Jan-01', 'yyyy-mon-dd') 
                   GROUP  BY Trunc(Aux.create_dtime))Four 
               ON Three.the_date = Four.the_date 
       INNER JOIN (SELECT Trunc(Aux.create_dtime)       AS The_Date, 
                          Count(DISTINCT Aux.player_id) AS Portal_DAU 
                   FROM   player_aux_pt Aux 
                   WHERE  ( Aux.site = 'Portal : Promotion' 
                             OR Aux.site = 'Portal : RadiumOne' 
                             OR Aux.site = 'Portal : Paymentwall' 
                             OR Aux.site = 'Portal : TrialPay' ) 
                          AND Trunc(Aux.create_dtime) >= 
                              To_date('2012-Jan-01', 'yyyy-mon-dd') 
                   GROUP  BY Trunc(Aux.create_dtime)) Five 
               ON Four.the_date = Five.the_date 

Most of the subqueries range from 2012-Jan-01 to present date, except for one that only have data from 09-Jul-12 to present.

So, when I run this query, the first date in the result is 09-Jul-12 and not 01-Jan-12.

How can I get the results to start at Jan 01, where all but one query has relevant data for?

  • 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-12T01:24:05+00:00Added an answer on June 12, 2026 at 1:24 am

    Your problem is that the dates are dropping out because they do not match. The answer to your question is LEFT OUTER JOIN instead of INNER JOIN. This keeps all rows in the first table (left side of the join), along with any matching information in the next table. If there is no match, all the values become NULL.

    Assuming that the first table has all the dates that you want, then change the join in all the subsequent queries.

    If you want 0’s instaed of NULL, then use coalesce() in the select clause to convert them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say I have a large query (for the purposes of this exercise say
I have a large number of csv files that look like this below: xxxxxxxx
I have this query in which one of the column is a calculated one.
I have a long running query that returns a large data set. This query
I have this relatively large numerical application code that may run for a few
I have this string containing a large chunk of html and am trying to
I have a very large UIView approx 3000x3000 in size. In this large view
I have read this article from High Scalability about Stack Overflow and other large
I have been handed this project that has a large number of issues with
I have a large number of instances of a C structure like this: struct

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.