Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Any query specialist? you have a challenge
Hi friends,
I have a table like,
CustNo NoOfOrders Month Year 1 1 2 2006 1 5 1 2006 1 8 8 2005 1 12 6 2005 2 3 12 2005 2 8 3 2006 2 2 1 2006 2 9 10 2005 2 11 11 2005
I need a sql statement to produce a output like,
(no of orders between this month range------------------------->) CustNo 1_to_3_month_ago 4_to_6_months_ago 7_to_12_months_ago 1 6 8 12 2 10 23 0
assume query execution date is today (4th April 2006). NOT through PL/SQL. thanks in advance Received on Tue Apr 04 2006 - 06:41:40 CDT