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
Herzi Pinki
.
queries table geo-tags for non matching pairs of iso:3166-1 and iso:3166-2 codes. Does not check for false iso:3166-1 codes.
Toggle Highlighting
SQL
use dewiki_p; #describe geo_tags; #select gt_page_id,gt_lat,gt_lon,gt_name,gt_primary,(select page_title from page where page_id = gt_page_id) from geo_tags where gt_country='AT' and gt_region is null #select abs(gt_lat - cen_gt_lat + gt_lon - cen_gt_lon) as distanzungefaehr, gt_lat, gt_lon, gt_page_id, gt_name, (select page_title from page where page_id = gt_page_id) from geo_tags, (select avg(gt_lat) cen_gt_lat,avg(gt_lon) cen_gt_lon,count(*) from geo_tags where gt_country='CH' and gt_region = 'TG') as zentrumdavon where gt_country='CH' and gt_region = 'TG' order by 1 desc limit 100; #select abs(gt_lat - cen_gt_lat + gt_lon - cen_gt_lon) as distanzungefaehr, gt_lat, gt_lon, gt_page_id, gt_name, (select page_title from page where page_id = gt_page_id) from geo_tags, (select avg(gt_lat) cen_gt_lat,avg(gt_lon) cen_gt_lon,count(*) from geo_tags where gt_country='BG') as zentrumdavon where gt_country='BG' order by 1 desc limit 200; #DE #select gt_lat, gt_lon, gt_page_id, gt_name, (select page_title from page where page_id = gt_page_id),gt_region from geo_tags where gt_country='DE' and gt_region not in ('BY','BW','BE','BB','HB','HH','HE','MV','NI','NW','RP','SL','SN','ST','SH','TH'); #CH #select gt_lat, gt_lon, gt_page_id, gt_name, (select page_title from page where page_id = gt_page_id),gt_region from geo_tags where gt_country='CH' and gt_region not in ('AG','AR','AI','BL','BS','BE','FR','GE','GL','GR','JU','LU','NE','NW','OW','SH','SZ','SO','SG','TI','TG','UR','VD','VS','ZG','ZH'); #AT #select gt_lat, gt_lon, gt_page_id, gt_name, (select page_title from page where page_id = gt_page_id),gt_region from geo_tags where gt_country='AT' and gt_region not in ('9','8','7','6','5','4','3','2','1'); select gt_lat, gt_lon, gt_page_id, gt_name, (select page_title from page where page_id = gt_page_id),gt_country,gt_region from geo_tags where gt_country='DE' and gt_region not in ('BY','BW','BE','BB','HB','HH','HE','MV','NI','NW','RP','SL','SN','ST','SH','TH') OR gt_country='CH' and gt_region not in ('AG','AR','AI','BL','BS','BE','FR','GE','GL','GR','JU','LU','NE','NW','OW','SH','SZ','SO','SG','TI','TG','UR','VD','VS','ZG','ZH') OR gt_country='AT' and gt_region not in ('9','8','7','6','5','4','3','2','1') OR gt_country='LI' and gt_region not in ('11','10','09','08','07','06','05','04','03','02','01') OR gt_country='IT' and gt_region not in ('65','23','75','77','45','36','78','72','62','42','25','57','67','21','88','82','52','32','55','34', 'AG','AL','AN','AO','AR','AP','AT','AV','BA','BT','BL','BN','BG','BI','BO','BZ','BS','BR','CA','CL', 'CB','CI','CE','CT','CZ','CH','CO','CS','CR','KR','CN','EN','FM','FE','FI','FG','FC','FR','GE','GO', 'GR','IM','IS','AQ','SP','LT','LE','LC','LI','LO','LU','MC','MI','MN','MS','MT','VS','ME','MO','MB', 'NA','NO','NU','OG','OT','OR','PD','PA','PR','PV','PG','PU','PE','PC','PI','PT','PN','PZ','PO','RG', 'RA','RC','RE','RI','RN','RM','RO','SA','SS','SV','SI','SO','SR','TA','TE','TR','TP','TV','TN','TS', 'TO','UD','VA','VE','VB','VC','VR','VV','VI','VT') ;
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...