Select to view content in your preferred language

Need SQL Help - Select Max Value  by Type Field

552
1
04-12-2010 03:46 PM
DawnLasprugato
Deactivated User
I think I can best describe my problem with a dummy example:

Let's say I have a City point shapefile of all the cities in the US.
The City point shapefile has three attributes: city_name, state_name, and population.

How do I select the highest population city for each state?  In the end, I'll have one point selected for each state representing the highest population city for that state.

I am hoping to do this using a SQL script. 
Gosh, this sounds so GIS101, but I really need some help 😮
0 Kudos
1 Reply
AlanToms
Regular Contributor
I would run the Summary Statisitcs tool, grouped by state to give me the city with the highest population.  From there join the table back to your feature class or run a query with the city names.

Alan
0 Kudos