select distinct MONTH_NBR MONTH,sum(nvl(VALUE_NBR,0)) TOTVAL FROM
(
select c.time_id,c.VALUE_NBR VALUE_NBR
from tab1 a,tab2 c
where a.r_id=c.r_id
and (a.descr like '%Count')
) z, timedim b
WHERE
b.TIME_ID=z.TIME_ID(+)
GROUP BY MONTH_NBR
Output we're gettng for the above query (...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.