with t as
 (select 201401 as month_id, 1 as region_id, 10 as cal_data
    from dual
  union
  select 201401, 2, 20
    from dual
  union
  select 201402, 1, 30
    from dual
  union
  select 201403, 1, 40
    from dual)
select month_id,
       region_id,
       cal_data,
       sum(cal_data) over(partition by region_id, substr(month_id, 1, 4) order by month_id) lj
  from (select tt1.month_id, tt1.region_id, nvl(tt2.cal_data, 0) cal_data
          from (select month_id, region_id
                  from (select distinct month_id from t) t1,
                       (select distinct region_id from t) t2) tt1,
               t tt2
         where tt1.month_id = tt2.month_id(+)
           and tt1.region_id = tt2.region_id(+))