Iam not getting the result as it should show all the customercd,customernames which are under 'S' category Iam getting only where the "aovalues" are there that customers list with this query can you please correct the query to get all the customers list of category 'S' with respective values.
select sum(nvl(aovalue,0)) val,b.customercd,customername
from saao0 a, sacustomer0 b
where a.compcode (+) = b.compcode
and a.customercd (+) = b.customercd
and category = 'S'
and aodt (+) between to_date('01-sep-01') and to_date('30-sep-01')
group by b.customercd,customername