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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Outer Joins with standard Oracle functions?

Re: Outer Joins with standard Oracle functions?

From: John <Nothanks_at_noaddress.com>
Date: Mon, 26 Jan 2004 13:42:09 +0000 (UTC)
Message-ID: <Xns947C8B9355A7ANothanksnoaddresscom@127.0.0.1>


seaelephant_at_hotmail.com (dx) wrote in
news:7f28ac37.0401230704.659e504b_at_posting.google.com:

> select b.begin_month, count(a.object_id)
> from all_objects a,
> (select add_months(trunc(sysdate, 'MM'), (-1)*rownum) begin_month from
> all_objects where rownum <= 12) b
> where b.begin_month = trunc(a.created(+), 'MM')
> group by b.begin_month
>
> count a "not null" column in "mytable" will do that.
>

Worked great until I plug this into the bigger picture, and try to get a coune of records prt month beginning per company (and perhaps another tier above that), only way I can think of there is to do a cartesian, which wont perform v well :-/

Any pointers?

Many Thanks :-) Received on Mon Jan 26 2004 - 07:42:09 CST

Original text of this message

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