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: Grouping averages by month, day or hour

Re: Grouping averages by month, day or hour

From: Daniel Morgan <dmorgan_at_exesolutions.com>
Date: Mon, 07 Oct 2002 17:06:23 GMT
Message-ID: <3DA1BEF0.67516B10@exesolutions.com>


E Shanahy wrote:

> Hi,
>
> I have a table (using Oracle 8.1.7) which stores 'User Sessions', made
> up of a 'START_TIME' date and an 'END_TIME' date. I would like to
> retrieve data from this table which shows the average session time,
> but I would like the get the average for each hour, day, or month.
> i.e., I would like to ask - "Give me the average session length for
> each hour between X and Y dates" - This should give me a number for
> each hour in the given time range. The averages should be distinct,
> consecutive averages and not moving window averages.
> I'm think it's possible to do this using PARTITION BY, but I'm not
> sure exactly how. Any ideas?
>
> Thanks
> Eoin

http://tahiti.oracle.com/pls/tahiti/tahiti.drilldown?levelnum=2&toplevel=a85397&method=FULL&chapters=0&book=&wildcards=1&preference=&expand_all=&verb=&word=ANALYTIC+FUNCTIONS#a85397

Daniel Morgan Received on Mon Oct 07 2002 - 12:06:23 CDT

Original text of this message

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