Display the Rank in asending & descending order for salary column
Can anybody solve this interview question in DataStage?
My input is:
EMPNO, DEPTNO, SALARY
1 A 100
2 A 4000
3 A 400
4 B 500
5 B 150
6 B 700 I need extra column "Rank" in the output is: EMPNO, DEPTNO, SALARY, RANK
1 A 100 3
2 A 4000 1
3 A 400 2
4 B 500 2
5 B 150 1
6 B 700 3 Thanks in advance.
Display the Rank in asending & descending order for salary column
My input is:
EMPNO, DEPTNO, SALARY
1 A 100
2 A 4000
3 A 400
4 B 500
5 B 150
6 B 700
I need extra column "Rank" in the output is:
EMPNO, DEPTNO, SALARY, RANK
1 A 100 3
2 A 4000 1
3 A 400 2
4 B 500 2
5 B 150 1
6 B 700 3
Thanks in advance.
Questions by sai3689 answers by sai3689
Related Answered Questions
Related Open Questions