Re: GROUP BY question

From: (wrong string) é Gamache <andre.gamache_at_sympatico.ca>
Date: Fri, 20 Apr 2001 21:19:25 GMT
Message-ID: <3AE0A8F9.25C6CA40_at_sympatico.ca>


Hi:
try this

select Whse, CustPN, maxP
from (select CustPN, max(price) as maxP From T Group by CustPN )
Order by Whse

Andre

Dan Star wrote:

> Given a table like:
>
> Whse CustPN Price Notes
> 208 34512 6.50 called to expedite on 4/2
> 209 34512 7.50
> 210 34512 7.00
> 208 55555 2.00
> 209 55555 1.50 last receiving on 4/6 was damaged
>
> is there a way to use SQL to GROUP BY CustPN MAX(Price) and return
>
> 208 55555 2.00
> 209 34512 7.50
>
> Dan
Received on Fri Apr 20 2001 - 23:19:25 CEST

Original text of this message