Topic
No replies
SystemAdmin
SystemAdmin
250 Posts
ACCEPTED ANSWER

Pinned topic Not using following ONE sql, how to get the same output by Cognos 8 ?

‏2012-01-04T08:39:54Z |
Hi all,

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, '%'
from table_1
group by sales_name
order by sales_name

pl. help, thx a lot !