CREATE TABLE countrydata ( city varchar(20), state varchar(2), population integer) SELECT city, state, MAX(population) FROM countrydata GROUP BY stateWhat value should SQL Server return for city? Within this table there will probably be more than one city for each state. VFP picks a value. I don't know of there's any reasoning to the value that's chosen nor would I want to rely on it. SQL Server (and the ANSI standard I believe) take the easy approach and just don't allow it.
SELECT city, state, population FROM countrydata WHERE population = ( SELECT MAX(population) FROM countrydata cd WHERE state = countrydata.state)-Mike