Puzzle of the Week #14:
For each department, find its share in the company’s total payroll. The puzzle should be solved with a single SELECT statement that does not utilize sub-queries, WITH clause, in-line views, temporary tables or PL/SQL functions
DEPTNO Share, % ------ ---------- 10 30.15 20 37.47 30 32.39
To submit your answer (one or more!) please start following this blog and add a comment to this post.
A correct answer (and workarounds!) will be published here in a week.
My Oracle Group on Facebook:
If you like this post, you may want to join my new 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.