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

  • Home
  • SEARCH
  • 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 8655273
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:59:13+00:00 2026-06-12T14:59:13+00:00

I am trying to get a result from oracle developer. I need to join

  • 0

I am trying to get a result from oracle developer.
I need to join 3 table with dates, the output should be:

Date        sum    count   num
2012-10-01  5000   30      15
2012-10-02  0      0       0
2012-10-03  60     150     350
2012-10-04  20     200     300
2012-10-05  1000   100     200
2012-10-06  1500   109     400

the input range is between 2012-10-01 and 2012-10-06.
If it can’t find data put the date with 0 in all other columns

  • 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-12T14:59:14+00:00Added an answer on June 12, 2026 at 2:59 pm

    You should generate all the dates and then left join the tables on dates.

    Something like(I used two tables):

    select date_col, nvl(sum(t1.val),0) + nvl(sum(t2.val,0)) as sum
    from 
      (select to_date('01-OCT-2012','dd-mon-yyyy') + level - 1 as date_col
       from dual connect by level <= to_date('06-OCT-2099','dd-mon-yyyy') - to_date('01-OCT-2012','dd-mon-yyyy') + 1
       ) d
    left join table1 t1 on (t1.date_column = d.date_col)
    left join table2 t2 on (some_t1_t2_join_condition and t2.date_column = d.date_col);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was trying to get the count from a table with millions of entries.
Maybe a simple question, I'm trying to get a result from a table where
I'm trying to return a result set from a 11g Oracle table, after I've
I'm trying to get the result of a COUNT as a column in my
I' trying to get some data from Oracle via ODBC to mySQL database. And
I am trying to get command output from Linux box eg: tnsping and I
I am trying to get one string, two integers and one timepicker result from
I'm currently trying to get a result from pyparsing as a pure list so
I am trying to get the row count of a result set by: rs.last();
I've been trying to get sqlplus to connect to Oracle from my OS X

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.