Page 1 of 1

Can it be possible to calculate sum of salary and number of

Posted: Sat Mar 10, 2012 2:27 pm
by hi_manoj
Hi

I was trying to implement a senario where i have in comming data from a dataset. I am trying to do this with one aggregator stage

Empno Deptno Salary
1111 10 200
2222 20 300
3333 10 400
4444 30 400
5555 20 400
6666 10 400

oupt put

Deptno Sum_Salary Mem_count
10 1000 3
20 700 2
30 400 1

Regards
Manoj

Posted: Sat Mar 10, 2012 3:33 pm
by chulett
So... what exactly did you try? What happened when you tried it?

Posted: Sat Mar 10, 2012 5:34 pm
by Mike
And yes it can be done with a single aggregator stage with a little help from a column generator or transformer stage preceding it.

Mike

Posted: Sat Mar 10, 2012 8:17 pm
by ray.wurlod
It can be done with a single Aggregator stage, but you might have to use SUM(1) rather than COUNT.