Grouping by Two Fields, Then Sorting Field1 as a Group

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
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top