Home » SQL & PL/SQL » SQL & PL/SQL » sql help
sql help [message #216771] Tue, 30 January 2007 05:48 Go to next message
pavuluri
Messages: 247
Registered: January 2007
Senior Member
hi
plz help me

i have

one table like emp

empno deptno sal
siva 20 3000
srinu 20 3000
ravi 20 4000
ravi 30 1000
kavi 30 2000
rama 30 2000
sasi 10 3000
kalyan 10 4000
deepak 10 4000


i would like the result


empno deptno sal
siva 20 3000
ravi 20 4000
ravi 30 1000
kavi 30 2000
kalyan 10 4000


send me query to find out top 3 distinct salaries for each
department
note: i need deptno,ename,sal


Thanks
srinivas





Re: sql help [message #216775 is a reply to message #216771] Tue, 30 January 2007 05:53 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
Search the site.
Re: sql help [message #216778 is a reply to message #216775] Tue, 30 January 2007 06:10 Go to previous messageGo to next message
pavuluri
Messages: 247
Registered: January 2007
Senior Member

ename deptno sal
siva 20 3000
srinu 20 3000
ravi 20 4000
ravi 30 1000
kavi 30 2000
rama 30 2000
sasi 10 3000
kalyan 10 4000
deepak 10 4000

i would like the result

ename deptno sal
siva 20 3000
ravi 20 4000
ravi 30 1000
kavi 30 2000
sasi 10 3000
kalyan 10 4000
Re: sql help [message #216781 is a reply to message #216778] Tue, 30 January 2007 06:19 Go to previous message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
Did you even bother going to the link I provided? If so, what SQL statement did you come up with?

[Updated on: Tue, 30 January 2007 06:20]

Report message to a moderator

Previous Topic: ConvertToClob does not work
Next Topic: What is Mutating Table?
Goto Forum:
  


Current Time: Tue Dec 10 03:33:47 CST 2024