Last active
December 16, 2015 08:29
-
-
Save pdbartsch/5406591 to your computer and use it in GitHub Desktop.
Searching gis.stackexchange for users local to me
http://data.stackexchange.com/gis/query/108984/users-in-california
This file contains 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
-- users in California | |
-- with a reputation > 1 | |
-- that have accessed site in past year | |
SELECT | |
ROW_NUMBER() OVER(ORDER BY Reputation DESC) AS [#], | |
Id AS [User Link], | |
Reputation, | |
Location, | |
LastAccessDate, | |
Age, | |
AboutMe, | |
WebsiteURL | |
FROM | |
Users | |
WHERE | |
(LOWER(Location) LIKE '%california%' | |
OR LOWER(Location) LIKE '%, ca') | |
AND Reputation > 1 | |
AND LastAccessDate >= Convert(datetime, '2012-04-17') | |
ORDER BY | |
Location ASC; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment