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
ISO 3166 Bot
.
Toggle Highlighting
SQL
use commonswiki_p; select gt_lat, gt_lon, gt_primary, gt_page_id, gt_name, (select page_namespace from page where page_id = gt_page_id and page_namespace in (0,6,14) ) as ns, (select page_title from page where page_id = gt_page_id) as title, gt_country,gt_region from geo_tags where ( gt_country='AD' and gt_region not in ('02','03','04','05','06','07','08') OR gt_country='AE' and gt_region not in ('AJ','AZ','DU','FU','RK','SH','UQ') OR gt_country='AF' and gt_region not in ('BAL','BAM','BDG','BDS','BGL','DAY','FRA','FYB','GHA','GHO','HEL','HER','JOW','KAB','KAN','KAP','KDZ','KHO','KNR','LAG','LOG','NAN','NIM','NUR','PAN','PAR','PIA','PKA','SAM','SAR','TAK','URU','WAR','ZAB') OR gt_country='AG' and gt_region not in ('03','04','05','06','07','08','10','11') OR gt_country='AL' and gt_region not in ('01','02','03','04','05','06','07','08','09','10','11','12'/*,'BR','BU','DI','DL','DR','DV','EL','ER','FR','GJ','GR','HA','KA','KB','KC','KO','KR','KU','LB','LE','LU','MK','MM','MR','MT','PG','PQ','PR','PU','SH','SK','SR','TE','TP','TR','VL'*/) OR gt_country='AM' and gt_region not in ('AG','AR','AV','ER','GR','KT','LO','SH','SU','TV','VD') OR gt_country='AO' and gt_region not in ('BGO','BGU','BIE','CAB','CCU','CNN','CNO','CUS','HUA','HUI','LNO','LSU','LUA','MAL','MOX','NAM','UIG','ZAI') OR gt_country='AR' and gt_region not in ('A','B','C','D','E','F','G','H','J','K','L','M','N','P','Q','R','S','T','U','V','W','X','Y','Z') OR gt_country='AT' and gt_region not in ('1','2','3','4','5','6','7','8','9') OR gt_country='AU' and gt_region not in ('ACT','NSW','NT','QLD','SA','TAS','VIC','WA') OR gt_country='AZ' and gt_region not in ('NX','BA','GA','LA','MI','NA','NV','SA','SM','SR','XA','YE','ABS','AGA','AGC','AGM','AGS','AGU','AST','BAB','BAL','BAR','BEY','BIL','CAB','CAL','CUL','DAS','FUZ','GAD','GOR','GOY','GYG','HAC','IMI','ISM','KAL','KAN','KUR','LAC','LAN','LER','MAS','NEF','OGU','ORD','QAB','QAX','QAZ','QBA','QBI','QOB','QUS','SAB','SAD','SAH','SAK','SAL','SAR','SAT','SBN','SIY','SKR','SMI','SMX','SUS','TAR','TOV','UCA','XAC','XCI','XIZ','XVD','YAR','YEV','ZAN','ZAQ','ZAR') OR gt_country='BA' and gt_region not in ('01','02','03','04','05','06','07','08','09','10','BRC','BIH','SRP') OR gt_country='BB' and gt_region not in ('01','02','03','04','05','06','07','08','09','10','11') OR gt_country='BD' and gt_region not in ('A','B','C','D','E','F','G','H','01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50','51','52','53','54','55','56','57','58','59','60','61','62','63','64') OR gt_country='BE' and gt_region not in ('BRU','VAN','VBR','VLG','VLI','VOV','VWV','WAL','WBR','WHT','WLG','WLX','WNA') OR gt_country='BF' and gt_region not in ('01','02','03','04','05','06','07','08','09','10','11','12','13','BAL','BAM','BAN','BAZ','BGR','BLG','BLK','COM','GAN','GNA','GOU','HOU','IOB','KAD','KEN','KMD','KMP','KOP','KOS','KOT','KOW','LER','LOR','MOU','NAM','NAO','NAY','NOU','OUB','OUD','PAS','PON','SEN','SIS','SMT','SNG','SOM','SOR','TAP','TUI','YAG','YAT','ZIR','ZON','ZOU') OR gt_country='BG' and gt_region not in ('01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28') OR gt_country='BH' and gt_region not in ('13','14','15','16','17') OR gt_country='BI' and gt_region not in ('BB','BL','BM','BR','CA','CI','GI','KI','KR','KY','MA','MU','MW','MY','NG','RM','RT','RY') OR gt_country='BJ' and gt_region not in ('AK','AL','AQ','BO','CO','DO','KO','LI','MO','OU','PL','ZO') OR gt_country='BN' and gt_region not in ('BE','BM','TE','TU') OR gt_country='BO' and gt_region not in ('B','C','H','L','N','O','P','S','T') OR gt_country='BQ' and gt_region not in ('BO','SA','SE') OR gt_country='BR' and gt_region not in ('AC','AL','AM','AP','BA','CE','DF','ES','GO','MA','MG','MS','MT','PA','PB','PE','PI','PR','RJ','RN','RO','RR','RS','SC','SE','SP','TO') OR gt_country='BS' and gt_region not in ('AK','BI','BP','BY','CE','CI','CK','CO','CS','EG','EX','FC','FP','GC','HI','HT','IN','LI','MC','MG','MI','NE','NO','NP','NS','RC','RI','SA','SE','SO','SS','SW','WG') OR gt_country='BT' and gt_region not in ('11','12','13','14','15','21','22','23','24','31','32','33','34','41','42','43','44','45','GA','TY') OR gt_country='BW' and gt_region not in ('CE','CH','FR','GA','GH','JW','KG','KL','KW','LO','NE','NW','SP','SE','SO','ST') OR gt_country='BY' and gt_region not in ('HM','BR','HO','HR','MA','MI','VI') OR gt_country='BZ' and gt_region not in ('BZ','CY','CZL','OW','SC','TOL') OR gt_country='CA' and gt_region not in ('AB','BC','MB','NB','NL','NS','NT','NU','ON','PE','QC','SK','YT') OR gt_country='CD' and gt_region not in ('KN','BC','KG','KL','MN','KS','KC','KE','LO','SA','MA','SK','NK','IT','HU','TO','BU','NU','MO','SU','EQ','TU','TA','HL','LU','HK') OR gt_country='CF' and gt_region not in ('AC','BB','BGF','BK','HK','HM','HS','KB','KG','LB','MB','MP','NM','OP','SE','UK','VR') OR gt_country='CG' and gt_region not in ('11','12','13','14','15','16','2','5','7','8','9','BZV') OR gt_country='CH' and gt_region not in ('AG','AI','AR','BE','BL','BS','FR','GE','GL','GR','JU','LU','NE','NW','OW','SG','SH','SO','SZ','TG','TI','UR','VD','VS','ZG','ZH') OR gt_country='CI' and gt_region not in ('AB','BS','CM','DN','GD','LC','LG','MG','SM','SV','VB','WR','YM','ZZ') OR gt_country='CL' and gt_region not in ('AI','AN','AP','AR','AT','BI','CO','LI','LL','LR','MA','ML','NB','RM','TA','VS') OR gt_country='CM' and gt_region not in ('AD','CE','EN','ES','LT','NO','NW','OU','SU','SW') OR gt_country='CN' and gt_region not in ('AH','FJ','GS','GD','GZ','HI','HE','HL','HA','HB','HN','JS','JX','JL','LN','QH','SN','SD','SX','SC','TW','YN','ZJ', 'GX','NM','NX','XZ','XJ', 'BJ','CQ','SH','TJ', 'HK', 'MO') OR gt_country='CO' and gt_region not in ('AMA','ANT','ARA','ATL','BOL','BOY','CAL','CAQ','CAS','CAU','CES','CHO','COR','CUN','DC','GUA','GUV','HUI','LAG','MAG','MET','NAR','NSA','PUT','QUI','RIS','SAN','SAP','SUC','TOL','VAC','VAU','VID') OR gt_country='CR' and gt_region not in ('A','C','G','H','L','P','SJ') OR gt_country='CU' and gt_region not in ('01','03','04','05','06','07','08','09','10','11','12','13','14','15','16','99') ) having ns = 0 or ns = 6 or ns = 14 ;
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...