Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2016
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. select state, county, poptotal, rank
  2. from
  3. (select state, county, poptotal, Rank()
  4. over (Partition BY county
  5. ORDER BY poptotal DESC)
  6. as rank
  7. from midwest
  8. group by state
  9. ) as rank
  10. where rank <= 5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement