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
Stefan Fadinger
.
German Wiki Bilderwünsche, die eine Ortsangabe haben, wofür es aber keine Koordinaten gibt (konkret keine Primärkoordinaten)
Toggle Highlighting
SQL
select pl_from,ort,asdf.page_title,page.page_id,gt_lat,gt_lon from ( select pl_from, IF (LOCATE('/C:',pl_title)>0, SUBSTRING_INDEX(SUBSTRING_INDEX(pl_title, '/C:', -1),',',1), NULL) lat_template, IF (LOCATE('/C:',pl_title)>0, SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSTRING_INDEX(pl_title, '/C:', -1),'!/',1),',',-1), NULL) as lon_template, IF (LOCATE('/D:',pl_title)>0, SUBSTRING_INDEX(SUBSTRING_INDEX(pl_title, '/D:', -1),'!/',1), '') description, IF (LOCATE('/O:',pl_title)>0, SUBSTRING_INDEX(SUBSTRING_INDEX(pl_title, '/O:', -1),'!/',1), NULL) ort, pl_title, gt_lat lat_page, gt_lon as lon_page, page_title from dewiki_p.pagelinks left join dewiki_p.geo_tags on gt_page_id = pl_from and gt_primary = 1 left join dewiki_p.page on page_id = pl_from where pl_namespace=10 AND pl_title LIKE 'Bilderwunsch/code!/%' ) as asdf left join (select page_id,page_title from page where page_namespace = 0) as page on page.page_title = ort left join geo_tags on page.page_id = gt_page_id and gt_primary = 1 where lat_template is null and lat_page is null and ort is not null
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...