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

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
hi_manoj
Participant
Posts: 56
Joined: Sat Aug 13, 2011 2:00 pm
Location: BLR

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

Post 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
Manoj
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So... what exactly did you try? What happened when you tried it?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Mike
Premium Member
Premium Member
Posts: 1021
Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL

Post 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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It can be done with a single Aggregator stage, but you might have to use SUM(1) rather than COUNT.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply