Puzzle of the Week #5:
Write a single SELECT statement that would list all 12 months and number of employees hired in each month. Year part should be ignored. Use emp table (in scott schema). Find as many solutions as possible.
Month Number of hires ------ --------------- JAN 1 FEB 2 MAR 0 APR 2 MAY 2 JUN 1 JUL 0 AUG 0 SEP 2 OCT 0 NOV 1 DEC 3
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.
If you like this post, you may want to join my new Oracle group on Facebook: https://www.facebook.com/groups/sqlpatterns/
For more tricks and cool techniques check my book “Oracle SQL Tricks and Workarounds” for instructions.