Top and Bottom Paid Employees
List top and bottom paid employees in each department without using UNION [ALL] operator
- Use a single SELECT statement only.
- SET Operators are not allowed
- You have about 1 week to solve the puzzle and submit your solution(s) but whoever does it sooner will earn more points.
- The scoring rules can be found here.
- Solutions must be submitted as comments to this blog post.
- Use <pre>or <code> html tags around your SQL code for better formatting and to avoid losing parts of your SQL.
A correct answer (and workarounds!) will be published here in about a week.
My Oracle Group on Facebook:
If you like this post, you may want to join my Oracle group on Facebook: https://www.facebook.com/groups/sqlpatterns/
Would you like to read about many more tricks and puzzles? For more tricks and cool techniques check my book “Oracle SQL Tricks and Workarounds” for instructions.