Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Help on query
vishnu wrote:
> Table Structure will be like this.
> Hi,
>
> I need to write Oracle query for this.Please help to solve this.
>
> Case ID, Major Type, Requested Date
>
> We need to find the count of cases which are over due, due today,
> between 7-14 days etc as shown in the table.
> Based on comparison between sysdate and requested date.
>
> Can this requirement fit into a query. ?
>
>
> Case Summary
> Major Over Due Due Today Due Next 7-14 Days
> Due Next 15-30 Days Due Over 30 Days
> Delivery 0 0 4 0 0
> Return 0 0 0 0 0
> Service 0 0 0 0 0
> Relocation 0 0 0 0 0
> Water Intrusion 0 0 0 0 0
>
>
> Thanks,
> Vishnu
You can probably use the oracle aggregation capabilities depending on what version you are using
select etc rank over ...
You can find the oracle documentation at http://tahiti.oracle.com or do some searching at Tom Kyte's site for examples http://asktom.oracle.com Received on Tue Dec 12 2006 - 17:40:00 CST