Thanks for the responses guys, I tried vongrunt's query out but i get this error "'row_number' is not a recognized function name."
Very strange ive looked row_number up and it is a valid function. Any idea why it might be saying this?
Forgive me if i'm a bit noob. Just out of college... :)
Define top 5%:
a) if there are 100 rows per group, retrieve 5% of 100 = 5 rows per group
b) if highest value in a group is $100,000 retrieve rows with Salary >= $95,000
c) if total sum of salaries is $1,000,000 retrieve only top salaries until sum reaches 5% of that ($50,000)"
Mostly a).. it...
Hey there
Ive been struggling with this one for a few days now..
Lets say I have one huge employee table (which includes the groupID and salary) containing everyone from managers to engineers to maintenance.
I need a query that will return the records of the top 5% highest salaries of each...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.