MAX OF Question

I have a table looks like this:

PKID SomeData SomeMoreData IntegerValue
1 Stuff More Stuff 300
2 Cool Very Cool 400
3 Stuff Less Stuff 500

I want to write a GroupBy query that returns the PKID for the row
having the MAX value of IntegerValue grouped by SomeData. I know this
should be simple but can't think of it off hand.

I'm guessing there's a subquery here under PKID?

Any help is appreciated!
lq
laurenq uantrell [ Do, 20 Dezember 2007 19:06 ] [ ID #1891399 ]

Re: MAX OF Question

Try this

select pkID from yourTbl where integervalue = (select max(integervalue)
from yourTbl)


Just change the name of my table to your tablename and then copy this
into a query Sql window and run it.

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Rich P [ Do, 20 Dezember 2007 21:44 ] [ ID #1891406 ]
Datenbanken » comp.databases.ms-access » MAX OF Question

Vorheriges Thema: Help with using a subquery to filter on multiple tables using a
Nächstes Thema: How to retrieve ms access database full information version