Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: a Max fonction in sql ?
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.
Go to http://tahiti.oracle.com in the future when just looking for answers to routine questions. Given the quality of your instincts you should have no problem finding what you seek.
Daniel Morgan Received on Fri Nov 01 2002 - 12:09:21 CST