Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Any query specialist? you have a challenge

Re: Any query specialist? you have a challenge

From: <mjbox01_at_gmail.com>
Date: 4 Apr 2006 05:06:11 -0700
Message-ID: <1144152371.530641.280980@u72g2000cwu.googlegroups.com>


Kumar wrote:
>
> 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.
Not really much of a challenge. You should be able to manage it yourself after reading about case and sum in the SQL Reference manual.

http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/toc.htm

http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/expressions004.htm#i1033392

http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/functions163.htm#i89126 Received on Tue Apr 04 2006 - 07:06:11 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US