You are right but I need to calculate the sum of ru_wallclock and cpu for the one owner in single row but this output shows the multiple records for one owner.

Is there a way to calculate the sum of all the values in columns ru_wallclock and cpu for the particular owner? but before this the calculations should be done according to the distinct job_number and then it should calculate the sum of values in columns ru_wallclock and cpu for the single owner.

eg.
select owner,
sum(case
when distinct job_number and name!='A' and slots <= 1 then ru_wallclock/3600
when distinct job_number and name!='B' and slots > 1 then ru_wallclock*slots/3600
end) as ru_wallclock_new ,

sum(case
when distinct job_number and name!='A' and slots <= 1 then cpu/3600
when distinct job_number and name!='B' and slots <= 1 then cpu/3600
end ) as cpu_new
)
from acctn
group by owner