how to solve this
Posted: Sat Jul 31, 2010 4:07 am
the source table sal
empno deptno sal
1 10 10,000
2 20 20,000
3 30 30,000
1 40 15,000
2 50 22,000
3 60 25,000
. . .
. . .
. . .
. . .
. . .
. . .
find the which employ having max(sal) in which deptno(output should be display all columns)
target like this
----------
empno deptno sal
1 40 15,000
2 50 22,000
3 60 25,000
. . .
. . .
. . .
. . .
. . .
empno deptno sal
1 10 10,000
2 20 20,000
3 30 30,000
1 40 15,000
2 50 22,000
3 60 25,000
. . .
. . .
. . .
. . .
. . .
. . .
find the which employ having max(sal) in which deptno(output should be display all columns)
target like this
----------
empno deptno sal
1 40 15,000
2 50 22,000
3 60 25,000
. . .
. . .
. . .
. . .
. . .