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: is it possible with sql?

Re: is it possible with sql?

From: Pablo Sanchez <pablo_at_dev.null>
Date: Thu, 2 May 2002 09:15:46 -0600
Message-ID: <EKcA8.625$VQ6.414329@news.uswest.net>

"gil guerillot" <gil.guerillot_at_ratp.fr> wrote in message news:aarbt8$fuv$1_at_gotix.reseau.ratp...
>
>
> i have 2 tables:
>
> (table objects: code_object,date_in,date_out)
> (table events:code_event,date_event,code_object)
>
> join by code_object
>
> i' d like to know the number of events by object and by year.
>
> but i must count only the event when the object is there at the
event
> date(between date_in and date_out)
>
> how can i do with SQL ?

Hi Gil!

You can do what you're seeking to do ... take a look at the GROUP BY clause.

--
Pablo Sanchez, High-Performance Database Engineering
mailto:pablo_at_hpdbe.com
http://www.hpdbe.com
Available for short-term and long-term contracts
Received on Thu May 02 2002 - 10:15:46 CDT

Original text of this message

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