Created
March 19, 2012 10:39
-
-
Save wonderchook/2107074 to your computer and use it in GitHub Desktop.
Top Building Mappers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select total, username, rank() OVER(ORDER BY total DESC) from (select count(*) as total, users.name as username from ways INNER JOIN way_tags ON (way_tags.way_id=ways.id) INNER JOIN users ON (users.id=ways.user_id) where way_tags.k='building' GROUP BY users.name ORDER BY total DESC) as answer; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment