473,413 Members | 1,737 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

top 5 ( or n) salaries in each department

Niy
how to get that with SQL query?
Jul 19 '05 #1
1 5529
Read the "Functions" chapter of the Oracle SQL Reference for "analytic
functions".

In Oracle 8i or higher you should write SQL like following:

select * from (
select DepName, Salary, row_number() over (partition by DepName order by
Salary desc) RK from SALARYTABLE
) where RK<=5

"Niy" <ni***@hotmail.com> wrote in message
news:55**************************@posting.google.c om...
how to get that with SQL query?

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: David Melby | last post by:
Currently the department in our company has two sections, the mainframe programmers and the "PC Programmers." That was fine when we were developing stand-alone apps using foxpro for dos. Now we...
80
by: | last post by:
Is there a performance difference between this: \\\ Dim i As Integer For i = 0 to myObject.Controls.Count - 1 myObject.Controls(i) = ... Next /// and this:
3
by: janet | last post by:
hi I want to extract one row from each range data. For example , we had table had following data name age department janet 22 HR John 45 IT Jane 25 IT
4
by: Joe User | last post by:
Hi all....I have a feeling this is going to be one of those twisted query questions, but here it goes anyways.... I want to generate a report that shows the chronology of events (represented by...
2
by: Angel | last post by:
I'm in the process of working on a Windows payroll application but I wanted some help on what design pattern I should use. For example, if my main Form needs all active employees in the DB, I'd...
0
by: Richard | last post by:
Is this possible? Here's my scenario: I have a report that presents mailed items and the events that occor for each item. First row shows the address and package information in bold. The rows...
0
by: abbaskhan | last post by:
i need to know (%) percentage or rate of each department sahring salary from the total salary eg total salary is 1000 dept a=200 dept b=350 and dept c=450 eg (then 200/(1000)*100=20%) ...
1
by: kazper | last post by:
Good day to all, I would like to ask for your expertise regarding putting numbers for each item for each group on my report (Visual Basic 6) Example of report HR Department No. ...
3
by: Suneelhema | last post by:
hi I want to know about a Query regarding Top 10 salaries from Emp and I want 1 to 10 numbers at the Regarding salaries I want Out put like 10000 1 ...
1
by: simonyong | last post by:
hello, everyone Sorry for disturb.. im newbie to asp.net im trying to do a task that as below: In a SAME datagrid, it ll show all data when user key in key word in textbox... datagrid will...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.