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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:00:20+00:00 2026-06-11T21:00:20+00:00

I am trying to combine 5 queries into one query so that I do

  • 0

I am trying to combine 5 queries into one query so that I do not have to run multiple queries every time I want to update the report. Each of the 5 reports is formatted so the result looks like:

    The_Date      Sp_DAU    CS_Dau
   01-Jan-12       3423      3674
   02-Jan-12       1823      2547

and so on….(different columns for each, EXCEPT The_Date stays the same)

The problem is, The_Date comes from multiple tables so I don’t know how to combine all the querys so the result looks like:

    The_Date       Sp_Dau     Cs_Dau  TapJoy_Ios_Dau  TapJoy_Android_DAU Portal_DAU
    01-Jan-12       1823      2547       35                  1115           33
    02-Jan-12       2453      3000       47                  1478           30

Does this make sense? Would it help if I posted all of the queries or is that too much information?

  • 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-11T21:00:21+00:00Added an answer on June 11, 2026 at 9:00 pm

    Looking at the second table, I’m assuming you’ll always want to aggregate this data based on the date. As long as that’s the case, you’ll want to JOIN based on the date for your number, N, of tables.

    SELECT * FROM Table1 T1
    INNER JOIN Table2 T2 ON T1.The_Date = T2.The_Date
    INNER JOIN Table3 T3 ON T1.The_Date = T3.The_Date
    ...
    INNER JOIN TableN TN ON T1.The_Date = TN.The_Date
    

    If your date is a SQL datetime, you’ll probably want to round to the same exact day. That gets a little more complicated, since you’ll need to use CAST( CAST( The_Date as INT) AS DATETIME) in each place that a datetime is referenced, including the joins.

    Hope that helps.

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

Sidebar

Related Questions

I'm trying to combine 2 queries into one like this $result=$db->query (DELETE FROM menu
I have two questions. First: I am trying to combine two queries into one
I have a tricky situation in trying to get information from multiple queries into
I've always been confused on how to combine multiple MySQL queries into one. I've
I am trying to see if I can combine 3 LINQ queries into one.
I'm trying to combine the following three media queries into one: @media only screen
I'm trying to create a single query that will combine the following two queries.
I'm trying to combine two queries into one if it's possible, here is what
I'm trying to combine multiple column values into 1 and then label them distinctly
I'm trying to combine 4 input fields into a jQuery function so that it

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.