Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Outer Joins with standard Oracle functions?
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
![]() |
![]() |