Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select state, county, poptotal, rank
- from
- (select state, county, poptotal, Rank()
- over (Partition BY county
- ORDER BY poptotal DESC)
- as rank
- from midwest
- group by state
- ) as rank
- where rank <= 5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement