Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
This query is marked as a draft
This query has been published
by
Myst
.
Toggle Highlighting
SQL
USE commonswiki_p; #SELECT * FROM globalimagelinks WHERE gil_page_namespace_id=0 LIMIT 25; SET @hereami = POINT(44.222981, 4.800418); SELECT p.page_title,(ST_Distance(@hereami, POINT(gt.gt_lat,gt.gt_lon))*111195) AS distance FROM page AS p JOIN geo_tags AS gt ON p.page_id=gt.gt_page_id WHERE p.page_namespace=6 AND p.page_title NOT IN (SELECT gil.gil_to FROM globalimagelinks AS gil WHERE gil.gil_page_namespace_id=0 AND gil.gil_wiki='frwiki') AND gt.gt_globe='earth' AND gt.gt_lat!=0 AND gt.gt_lon!=0 AND (ST_Distance(@hereami, POINT(gt.gt_lat,gt.gt_lon))*111195)<1500 ORDER BY distance LIMIT 10;
By running queries you agree to the
Cloud Services Terms of Use
and you irrevocably agree to release your SQL under
CC0 License
.
Submit Query
Stop Query
All SQL code is licensed under
CC0 License
.
Checking query status...