the sql :
with table_1 as (
select sales_name, sales_amount,
from abclib/pffile where year=2011 and month between 1 to 12),
table_2 as (
select sum(sales_amount) as all_person_total_sales
from abclib/pffile where year=2011 and month between 1 to 12)
select sales_name , sum(sales_amount) as personal_total_sales ,
decimal(sum(sales_amount )*100/(select all_person_total_sales from table_2),5,2) as percent, '%'
group by sales_name
order by sales_name
pl. help, thx a lot !
This topic has been locked.