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: a Max fonction in sql ?

Re: a Max fonction in sql ?

From: Dave <David.W.Spencer_at_elcaro.moc>
Date: Fri, 01 Nov 2002 11:15:27 +0000
Message-ID: <3DC2624F.3090800@elcaro.moc>


My only question is, why didn't you type this directly into SQL*Plus to see what would happen? I'm no SQL expert but that query looks like it should be exactly right.

locnet wrote:
> My table is
>
> article | price
> --------------
> car | 1000
> car | 800
> car | 900
> bicycle | 50
> bicycle | 60
> bicycle | 20
> train | 7000
>
>
> and I want the bigger price for each article :
>
> article | price
> --------------
> car | 1000
> bicycle | 60
> train | 7000
>
> I'd like something like a hypothetic MAX function that work on group :
> SELECT article, MAX(price)
> FROM table
> GROUP BY article
>
> Does something similar existe ?
>
>
> Thanks.
>

-- 
Email address munged to avoid SPAM
Reverse the last two parts to reply directly
Received on Fri Nov 01 2002 - 05:15:27 CST

Original text of this message

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