| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: GROUP BY question
Hi,
Dan Star wrote:
>
> Carlos,
>
> I had to remove CustPN from the SELECT clause in the sub query and then
> it worked in Access97.
>
> Thanks,
> Dan
>
> Carlos Bromanski wrote:
> >
> > SELECT Whse, CustPN, Price
> > FROM ThatTable AS A
> > WHERE Price = (
> > SELECT max(Price), CustPN
> > FROM ThatTable AS B
> > WHERE B.CustPN = A.CustPN
> > GROUP BY CustPN)
Keep in mind though, that this query might give you more than one row per CustPN if there is more than one row with the maximum Price.
Regards,
Heinz
Received on Fri Apr 20 2001 - 01:49:58 CDT
![]() |
![]() |