Group By and find maximum

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
pavan_test
Premium Member
Premium Member
Posts: 263
Joined: Fri Sep 23, 2005 6:49 am

Group By and find maximum

Post by pavan_test »

Hi All,

I have a input with 3 columns col A, col B and col C

For each of col A and col B combination, I have to write max(col C) to the output.

There can be duplicate data in the columns col A, col B and col C

can someone please let me know how do i achieve this in datastage.

Thanks
pavan
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Why not just do it in your source SQL? I'm assuming a database table, of course. Otherwise use the Aggregator to do the exact same thing: group by A & B, maximum(C).
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply