Skip to content

Instantly share code, notes, and snippets.

@vladholubiev
Last active December 21, 2015 14:40
Show Gist options
  • Select an option

  • Save vladholubiev/7131b769eb8deecfaf3e to your computer and use it in GitHub Desktop.

Select an option

Save vladholubiev/7131b769eb8deecfaf3e to your computer and use it in GitHub Desktop.

Returns a list of locations of users who asked a question about MongoDB.

SELECT Users.Location
FROM Posts
INNER JOIN Users
ON Posts.OwnerUserId = Users.Id
WHERE Posts.Tags LIKE '%mongodb%'
AND Users.Location IS NOT NULL
AND RTrim(Users.Location) > ''
ORDER BY Posts.CreationDate DESC;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment