Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Aggregation stumper

Re: Aggregation stumper

From: Terry Dykstra [TeamPS] <no_spam_tdykstra_at_cfol.ab.ca>
Date: Fri, 15 May 1998 12:02:06 -0600
Message-ID: <355c82e0.0@news.cadvision.com>


select customer
from customer_order
group by customer
having count(*) < 3 and sum(order_amount) > 2000

--
Terry Dykstra [TeamPS]
Canadian Forest Oil Ltd.
maxmike_at_ibx.bc.ca wrote in message <6jhpqg$bfi$1_at_nnrp1.dejanews.com>...
>
>
>I believe the following is not directly expressible in a single query:
>
>"Customer names for customers that have at most 3 orders with the
>average of order amounts greater than 2000"
>
>In other words I need the average of the counted orders.
>
>I'd love to be shot down in my belief! Any ideas?
>
>-----== Posted via Deja News, The Leader in Internet Discussion ==-----
>http://www.dejanews.com/ Now offering spam-free web-based newsreading
Received on Fri May 15 1998 - 13:02:06 CDT

Original text of this message

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