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: max and avg together

Re: max and avg together

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Thu, 07 Oct 2004 08:13:24 -0700
Message-ID: <1097162087.859669@yasure>


Toomas Kristin wrote:

> Hi!
>
> I have a quite simple problem but I can't resolve this one.
>
> I have a table with structure: date, code and amount. And want to
> compose a query which gives for result date, code and average maximum on
> each day.
>
> For example source data is
> 01-01-2004 A 10.00
> 01-01-2004 A 30.00
> 02-01-2004 B 50.00
> 02-01-2004 C 40.00
> 03-01-2004 A 99.00
>
> and result would be
> 01-01-2004 A 20.00
> 02-01-2004 B 50.00
> 03-01-2004 A 99.00
>
>
> Thx for any help!

We don't do homework for students. This can be done with GROUP BY or with ANALYTIC FUNCTIONS. Likely your instructor expects you to use GROUP BY.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)
Received on Thu Oct 07 2004 - 10:13:24 CDT

Original text of this message

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