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
# ISO status 2020-03-02 # last change MK, ZA, ... use commonswiki_p; select gt_lat, gt_lon, gt_page_id, gt_name, (select page_namespace from page where page_id = gt_page_id) 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 not in ( 'XA', 'XI', 'XN', 'XO', 'XP', 'XS', 'AE','AF','AX','AL','AS','AD','AO','AI','AQ','AG','AR','AM','AW','AU','AT','AZ', 'BS','BH','BD','BB','BL','BY','BE','BZ','BJ','BM','BT','BO','BQ','BA','BW','BV','BR','BN','BG','BF','BI', 'CM','CA','CH','CV','CF','CL','CN','CX','CC','CO','CG','CD','CK','CR','CI','CU','CW','CY','CZ', 'DE','DK','DJ','DM','DO','DZ', 'EC','EG','EH','ER','EE','ES','ET', 'FK','FO','FJ','FI','KN','FR','FX', 'GA','GB','GM','GE','GF','GH','GI','GR','GL','GD','GP','GU','GS','GT','GG','GN','GQ','GW','GY', 'HT','HM','HN','HK','HR','HU', 'IS','IN','IO','ID','IR','IQ','IE','IM','IL','IT', 'JM','JP','JE','JO','KZ','KE','KH','KI','KM','KP','KR','KW','KG','KY', 'LA','LB','LC','LV','LK','LS','LR','LY','LI','LT','LU', 'MO','MK','MF','MG','MW','MY','MV','ML','MT','MH','MQ','MR','MU','MX','FM','MD','MC','MN','ME','MS','MA','MZ','MM', 'NA','NR','NP','NL','NC','NZ','NI','NE','NG','NU','NF','MP','NO','OM', 'PK','PW','PS','PA','PF','PG','PY','PE','PH','PM','PN','PL','PT','PR','QA', 'RE','RO','RU','RW','RS', 'SM','ST','SA','SH','SN','SC','SL','SG','SX','SK','SI','SB','SO','SS','SD','SR','SJ','SZ','SE','SV','SY', 'TD','TF','TW','TJ','TZ','TH','TL','TG','TK','TO','TT','TN','TR','TM','TC','TV', 'UG','UA','US','UM','UY','UZ', 'VA','VC','VU','VE','VN','VG','VI', 'WF','WS','YE','YT','ZA','ZM','ZW' ) having ns = 0 or ns = 6 or ns = 14; 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') ) 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...