Grouping by Two Fields, Then Sorting Field1 as a Group

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Lets say I have a table….State, City, Population

I have a query where I've Grouped by State, Grouped by City, Value of
Population

How can I sort (probably by subquery or multiple queries?) the output such
that the highest population state's highest population city is first,
followed in descending population order by all other cities within THAT
state. Next would come the 2nd highest poplulation state and all of it's
cities, etc.

Problem I'm having is the states are getting split out and it's essentially
just sorting by city. Thanks
 
Without having the data to test with, I can't give an exact answer, but here
is the concept. It may take two queries.
Create a Totals query that would have State, State Population. (Sum of all
Cities Population for each state). Then use that in another query that would
include
State, City, City Population and join them on State and Ordery State
Population.
 
Back
Top