>>
SELECT city, state, population
>>FROM countrydata
>>WHERE population = (
>> SELECT MAX(population)
>> FROM countrydata cd
>> WHERE state = countrydata.state)
>I would have to agree, VFP should do the same thing.
>
>As for your correlated sub query, what is the "cd" in the from clause for, or is it one of those off the cuff things :) I will have to play around with sub queries, they could be pretty potent.
The
cd is an alias for the countrydata table. Within the query I can know refer to the countrydata table as cd. In this instance, it lets the engine determine which instance of the countrydata table I'm referring to.
-Mike