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: Sql question

Re: Sql question

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Mon, 23 Dec 2002 19:22:48 +0100
Message-ID: <v0m5pmn700n53c@corp.supernews.com>

"michel guerillot" <michel.guerillot_at_free.fr> wrote in message news:3e07508a$0$17169$626a54ce_at_news.free.fr...
>
> Hi,
>
> is it possible using only SQL selects ?
>
> i have 2 tables (fields)
>
> objects(code,desc) and events(event_code,date_Event,object_code)
>
> join by objects.code=events.object_code
>
> my problem is to know for each object (also if it has no event) the number
> of "replay events" in the trimestry ( counted only if the same objects had
> one or more event in the previous trimestry ....date_event-90.....)and
the
> number of events in the trimestry
>
> something like this graphicly
>
> objects replay _events events
> --------------------------------------------
> obj1 2 4
> obj2 0 2
> obj3 1 3
> obj4 0 0
>
>
>
> thanks
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

You'll need outer join. objects.code=events.object_code(+)

Hth

--
Sybrand Bakker
Senior Oracle DBA

to reply remove '-verwijderdit' from my e-mail address


>
Received on Mon Dec 23 2002 - 12:22:48 CST

Original text of this message

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