DATABASE VERSION PLEASE !!!
SQL statements that can be used will be very dependent on which database version you are on.
Step One: define, mathematically, how to fill in the missing Y values.
with month_generator as ( select add_months( trunc( to_date( '11-12-13', 'MM-DD-RR' ) -- replace this with the first date ,'MONTH' -- 'truncating' by month ) ,level - 1 -- adding a month (0-based) ) AS a_month from dual connect by level <= 6 -- replace '5' with a calculation that determines how many months ) select .... -- place your regular SQL here. use NVL( value, <formula from above> ) for value from month_generator X left outer join T on ( t.a_date = X.a_date );
PS - This is really an SQL question. you'd be better off asking it in the "SQL and PL/SQL" forum.
You can ask a moderator to move this thread by "report abuse" and typing in your request.