This is the subquery but I am trying to find a way to add Zeros in this subquery... as there are 100s of totals and columns and this is one of the several subqueries in it. I tried to add a decode but it did not work I probably did it wrongly.
(select rd.rpt_nm as rep_id, count(*) as SW
from rpt_descriptor rd,
rpt_usage ru,
employee_display ed
where
ed.EMPLOYEE_ID = ru.LAST_USER_ID
and rd.RPT_NM = ru.rpt_nm
and
ed.home_region_nm = 'Southwest'
group by rd.rpt_nm) sub12,
Tags: