...function doesn't quite fit the requirements. It's got such a great name!
SQL> SELECT decode(wb, 11, 'Over 120 hrs', 'Between ' || (wb - 1) * 12 || ' and ' || wb * 12 || ' hours.') rng,
2 COUNT(0) cnt
3 FROM (SELECT width_bucket((shipped_date - order_date) * 24, 0, 120, 10) wb...