SQL
x
# 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')
# bis 2017:
#OR gt_country='CN' and gt_region not in ('11','12','13','14','15','21','22','23','31','32','33','34','35','36','37','41','42','43','44','45','46','50','51','52','53','54','61','62','63','64','65','71','91','92')
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')
OR gt_country='CV' and gt_region not in ('B','S','BR','BV','CA','CF','CR','MA','MO','PA','PN','PR','RB','RG','RS','SD','SF','SL','SM','SO','SS','SV','TA','TS')
OR gt_country='CY' and gt_region not in ('01','02','03','04','05','06')
OR gt_country='CZ' and gt_region not in (/*'101','102','103','104','105','106','107','108','109','110','111','112','113','114','115','116','117','118','119','120','121','122', */
'201','202','203','204','205','206','207','208','209','20A','20B','20C','311','312','313','314','315','316','317','321','322','323','324','325','326','327','411','412','413','421','422','423','424','425','426','427','511','512','513','514','521','522','523','524','525','531','532','533','534','631','632','633','634','635','641','642','643','644','645','646','647','711','712','713','714','715','721','722','723','724','801','802','803','804','805','806',
'31','64','41','52','51','80','71','53','32','10','20','42','63','72'
/*,'JC','JM','KA','KR','LI','MO','OL','PA','PL','PR','ST','US','VY','ZL'*/)
OR gt_country='DE' and gt_region not in ('BB','BE','BW','BY','HB','HE','HH','MV','NI','NW','RP','SH','SL','SN','ST','TH')
OR gt_country='DJ' and gt_region not in ('AR','AS','DI','DJ','OB','TA')
OR gt_country='DK' and gt_region not in ('81','82','83','84','85')
OR gt_country='DM' and gt_region not in ('02','03','04','05','06','07','08','09','10','11')
OR gt_country='DO' 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','29','30','31','32')
OR gt_country='DZ' 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','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48')
OR gt_country='EC' and gt_region not in ('A','B','C','D','E','F','G','H','I','L','M','N','O','P','R','S','SD','SE','T','U','W','X','Y','Z')
OR gt_country='EE' and gt_region not in ('37','39','45','50','52','56','60','64','68','71','74','79','81','84','87',
'184','296','321','424','446','511','514','567','624','663','735','784','793','897','919',
'130','141','142','171','191','198','205','214','245','247','251','255','272','283','284','291','293',
'303','305','317','338','353','430','431','432','441','442','478','480','486',
'503','528','557','586','615','618','622','638','651','653','661','668','689','698',
'708','712','714','719','726','732','792','796','803','809','824','834','855','890','899',
'901','903','907','917','928')
OR gt_country='EG' and gt_region not in ('ALX','ASN','AST','BA','BH','BNS','C','DK','DT','FYM','GH','GZ','HU','IS','JS','KB','KFS','KN','LX','MN','MNF','MT','PTS','SHG','SHR','SIN','SU','SUZ','WAD')
OR gt_country='ER' and gt_region not in ('AN','DK','DU','GB','MA','SK')
OR gt_country='ES' and gt_region not in ('AN','AR','AS','IB','PV','EX','GA','CN','CB','CL','CM','CT','RI','MD','MC','NC','VC','A','AB','AL','AV','B','BA','BI','BU','C','CA','CC','CE','CO','CR','CS','CU','GC','GI','GR','GU','H','HU','J','L','LE','LO','LU','M','MA','ML','MU','NA','O','OR','P','PM','PO','S','SA','SE','SG','SO','SS','T','TE','TF','TO','V','VA','VI','Z','ZA')
OR gt_country='ET' and gt_region not in ('AA','AF','AM','BE','DD','GA','HA','OR','SN','SO','TI')
OR gt_country='FI' and gt_region not in ('01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19')
OR gt_country='FJ' and gt_region not in ('C','E','N','R','W','01','02','03','04','05','06','07','08','09','10','11','12','13','14')
OR gt_country='FM' and gt_region not in ('KSA','PNI','TRK','YAP')
OR gt_country='FR' and gt_region not in ('ARA','BFC','BRE','CVL','GES','HDF','IDF','NOR','NAQ','OCC','PDL','PAC','20R',
'GF','GP','MQ','RE','YT','PF','TF','NC','BL','MF','PM','WF','CP',
'01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','21','22','23','24','25','26','27','28','29','2A','2B','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','65','66','67','68','69','70','71','72','73','74','75','76','77','78','79','80','81','82','83','84','85','86','87','88','89','90','91','92','93','94','95')
OR gt_country='GA' and gt_region not in ('1','2','3','4','5','6','7','8','9')
OR gt_country='GB' and gt_region not in ('ENG','WLS','SCT','NIR', 'ABD','ABE','AGB','AGY','ANS','ANT','ARD','ARM','BAS','BBD','BCP','BDF','BDG','BEN','BEX','BFS','BGE','BGW','BIR','BKM','BLA','BLY','BNB','BNE','BNH','BNS','BOL','BPL','BRC','BRD','BRY','BST','BUR','CAM','CAY','CBF','CGN','CGV','CHE','CHW','CKF','CKT','CLD','CLK','CLR','CMA','CMD','CMN','CON','COV','CRF','CRY','CSR','CWY','DAL','DBY','DEN','DER','DEV','DGN','DGY','DNC','DND','DOR','DOW','DRY','DUD','DUR','EAL','EAY','EDH','EDU','ELN','ELS','ENF','ERW','ERY','ESS','ESX','FAL','FER','FIF','FLN','GAT','GLG','GLS','GRE','GWN','HAL','HAM','HAV','HCK','HEF','HIL','HLD','HMF','HNS','HPL','HRT','HRW','HRY','IOS','IOW','ISL','IVC','KEC','KEN','KHL','KIR','KTT','KWL','LAN','LBH','LCE','LDS','LEC','LEW','LIN','LIV','LMV','LND','LRN','LSB','LUT','MAN','MDB','MDW','MFT','MIK','MLN','MON','MRT','MRY','MTY','MYL','NAY','NBL','NDN','NEL','NET','NFK','NGM','NLK','NLN','NSM','NTA','NTH','NTL','NTT','NTY','NWM','NWP','NYK','NYM','OLD','OMH','ORK','OXF','PEM','PKN','PLY','POR','POW','PTE','RCC','RCH','RCT','RDB','RDG','RFW','RIC','ROT','RUT','SAW','SAY','SCB','SFK','SFT','SGC','SHF','SHN','SHR','SKP','SLF','SLG','SLK','SND','SOL','SOM','SOS','SRY','STB','STE','STG','STH','STN','STS','STT','STY','SWA','SWD','SWK','TAM','TFW','THR','TOB','TOF','TRF','TWH','VGL','WAR','WBK','WDU','WFT','WGN','WIL','WKF','WLL','WLN','WLV','WND','WNM','WOK','WOR','WRL','WRT','WRX','WSM','WSX','YOR','ZET',
'ANN','AND','ABC','BFS','CCG','DRS','FMO','LBC','MEA','MUL','NMD')
OR gt_country='GD' and gt_region not in ('01','02','03','04','05','06','10')
OR gt_country='GE' and gt_region not in ('AB','AJ','GU','IM','KA','KK','MM','RL','SJ','SK','SZ','TB')
OR gt_country='GH' and gt_region not in ('AF','AH','BO','BE','CP','EP','AA','NE','NP','OT','SV','UE','UW','TV','WP','WN')
OR gt_country='GL' and gt_region not in ('AV','KU','QE','QT','SM')
OR gt_country='GM' and gt_region not in ('B','L','M','N','U','W')
OR gt_country='GN' and gt_region not in ('C','B','F','K','D','L','M','N','BE','BF','BK','CO','DB','DI','DL','DU','FA','FO','FR','GA','GU','KA','KB','KD','KE','KN','KO','KS','LA','LE','LO','MC','MD','ML','MM','NZ','PI','SI','TE','TO','YO')
OR gt_country='GQ' and gt_region not in ('AN','BN','BS','CS','DJ','KN','LI','WN')
OR gt_country='GR' and gt_region not in ('I','D','F','M','H','K','A','J','L','E','G','C','B',
/*'01','03','04','05','06','07','11','12','13','14','15','16','17','21','22','23','24','31','32','33','34','41','42','43','44','51','52','53','54','55','56','57','58','59','61','62','63','64',*/
'69'
/*,'71','72','73','81','82','83','84','85','91','92','93','94','A1'*/)
OR gt_country='GT' and gt_region not in ('AV','BV','CM','CQ','ES','GU','HU','IZ','JA','JU','PE','PR','QC','QZ','RE','SA','SM','SO','SR','SU','TO','ZA')
OR gt_country='GW' and gt_region not in ('BA','BL','BM','BS','CA','GA','OI','QU','TO','L','N','S')
OR gt_country='GY' and gt_region not in ('BA','CU','DE','EB','ES','MA','PM','PT','UD','UT')
OR gt_country='HN' and gt_region not in ('AT','CH','CL','CM','CP','CR','EP','FM','GD','IB','IN','LE','LP','OC','OL','SB','VA','YO')
OR gt_country='HR' 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')
OR gt_country='HT' and gt_region not in ('AR','CE','GA','ND','NE','NI','NO','OU','SD','SE')
OR gt_country='HU' and gt_region not in ('BA','BC','BE','BK','BU','BZ','CS','DE','DU','EG','ER','FE','GS','GY','HB','HE','HV','JN','KE','KM','KV','MI','NK','NO','NY','PE','PS','SD','SF','SH','SK','SN','SO','SS','ST','SZ','TB','TO','VA','VE','VM','ZA','ZE')
OR gt_country='ID' and gt_region not in ('PP','JW','KA','ML','NU','SL','SM', 'AC', 'BA','BB','BE','BT','GO','JA','JB','JI','JK','JT','KB','KI','KR','KS','KT','KU','LA','MA','MU','NB','NT','PA','PB','PB','RI','SA','SB','SG','SN','SR','SS','ST','SU','YO')
OR gt_country='IE' and gt_region not in ('C','L','M','U','CE','CN','CO','CW','D','DL','G','KE','KK','KY','LD','LH','LK','LM','LS','MH','MN','MO','OY','RN','SO','TA','WD','WH','WW','WX')
OR gt_country='IL' and gt_region not in ('D','HA','JM','M','TA','Z')
OR gt_country='IN' and gt_region not in ('AP','AR','AS','BR','CT','GA','GJ','HR','HP','JH','KA','KL','MP','MH','MN','ML','MZ','NL','OR','PB','RJ','SK','TN','TG','TR','UT','UP','WB',
'AN','CH','DH','DL','JK','LA','LD','PY')
OR gt_country='IQ' and gt_region not in ('AN','AR','BA','BB','BG','DA','DI','DQ','KA','MA','MU','NA','NI','QA','SD','SU','KI','WA')
OR gt_country='IR' and gt_region not in ('00','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')
OR gt_country='IS' and gt_region not in ('0','1','2','3','4','5','6','7','8')
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','AP','AQ','AR','AT','AV','BA','BG','BI','BL','BN','BO','BR','BS','BT','BZ',
'CA','CB','CE','CH','CL','CN','CO','CR','CS','CT','CZ','EN','FC','FE','FG','FI','FM','FR',
'GE','GO','GR',
'IM','IS','KR','LC','LE','LI','LO','LT','LU','MB','MC','ME','MI','MN','MO','MS','MT','NA','NO','NU','OR',
'PA','PC','PD','PE','PG','PI','PN','PO','PR','PT','PU','PV','PZ',
'RA','RC','RE','RG','RI','RM','RN','RO',
'SA','SI','SO','SP','SR','SS','SU','SV','TA','TE','TN','TO','TP','TR','TS','TV','UD','VA','VB','VC','VE','VI','VR','VT','VV')
OR gt_country='JM' and gt_region not in ('01','02','03','04','05','06','07','08','09','10','11','12','13','14')
OR gt_country='JO' and gt_region not in ('AJ','AM','AQ','AT','AZ','BA','IR','JA','KA','MA','MD','MN')
OR gt_country='JP' 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','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47')
OR gt_country='KE' 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','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47')
OR gt_country='KG' and gt_region not in ('B','C','GB','J','N','O','T','Y')
OR gt_country='KH' and gt_region not in ('1','10','11','12','13','14','15','16','17','18','19','2','20','21','22','23','24','25','3','4','5','6','7','8','9')
OR gt_country='KI' and gt_region not in ('G','L','P')
OR gt_country='KM' and gt_region not in ('A','G','M')
OR gt_country='KN' and gt_region not in ('K','N','01','02','03','04','05','06','07','08','09','10','11','12','13','15')
OR gt_country='KP' and gt_region not in ('01','02','03','04','05','06','07','08','09','10','13','14')
OR gt_country='KR' and gt_region not in ('11','26','27','28','29','30','31','41','42','43','44','45','46','47','48','49','50')
OR gt_country='KW' and gt_region not in ('AH','FA','HA','JA','KU','MU')
OR gt_country='KZ' and gt_region not in ('AKM','AKT','ALA','ALM','AST','ATY','BAY','KAR','KUS','KZY','MAN','PAV','SEV','SHY','VOS','YUZ','ZAP','ZHA')
OR gt_country='LA' and gt_region not in ('AT','BK','BL','CH','HO','KH','LM','LP','OU','PH','SL','SV','VI','VT','XA','XE','XI','XS')
OR gt_country='LB' and gt_region not in ('AK','AS','BA','BH','BI','JA','JL','NA')
OR gt_country='LC' and gt_region not in ('01','02','03','05','06','07','08','10','11','12')
OR gt_country='LI' and gt_region not in ('01','02','03','04','05','06','07','08','09','10','11')
OR gt_country='LK' and gt_region not in ('1','11','12','13','2','21','22','23','3','31','32','33','4','41','42','43','44','45','5','51','52','53','6','61','62','7','71','72','8','81','82','9','91','92')
OR gt_country='LR' and gt_region not in ('BG','BM','CM','GB','GG','GK','GP','LO','MG','MO','MY','NI','RG','RI','SI')
OR gt_country='LS' and gt_region not in ('A','B','C','D','E','F','G','H','J','K')
OR gt_country='LT' and gt_region not in ('AL','KL','KU','MR','PN','SA','TA','TE','UT','VL', '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')
OR gt_country='LU' and gt_region not in ('CA','CL','DI','EC','ES','GR','LU','ME','RD','RM','VD','WI')
OR gt_country='LV' and gt_region not in ('DGV','JEL','JKB','JUR','LPX','REZ','RIX','VEN','VMR','001','002','003','004','005','006','007','008','009','010','011','012','013','014','015','016','017','018','019','020','021','022','023','024','025','026','027','028','029','030','031','032','033','034','035','036','037','038','039','040','041','042','043','044','045','046','047','048','049','050','051','052','053','054','055','056','057','058','059','060','061','062','063','064','065','066','067','068','069','070','071','072','073','074','075','076','077','078','079','080','081','082','083','084','085','086','087','088','089','090','091','092','093','094','095','096','097','098','099','100','101','102','103','104','105','106','107','108','109','110')
OR gt_country='LY' and gt_region not in ('BA','BU','DR','GT','JA','JG','JI','JU','KF','MB','MI','MJ','MQ','NL','NQ','SB','SR','TB','WA','WD','WS','ZA')
OR gt_country='MA' and gt_region not in ('01','02','03','04','05','06','07','08','09','10','11','12',
'AGD','AOU','ASZ','AZI','BEM','BER','BES','BOD','BOM','BRR','CAS','CHE','CHI','CHT','DRI','ERR','ESI','ESM',
'FAH','FES','FIG','FQH','GUE','GUF','HAJ','HAO','HOC','IFR','INE','JDI','JRA','KEN','KES','KHE','KHN','KHO','LAA','LAR',
'MAR','MDF','MED','MEK','MID','MOH','MOU','NAD','NOU','OUA','OUD','OUJ','OUZ','RAB','REH','SAF','SAL','SEF','SET','SIB','SIF','SIK','SIL','SKH',
'TAF','TAI','TAO','TAR','TAT','TAZ','TET','TIN','TIZ','TNG','TNT','YUS','ZAG')
OR gt_country='MC' and gt_region not in ('CL','CO','FO','FO','GA','JE','LA','MA','MC','MG','MO','MU','PH','SD','SO','SP','SR','VR')
OR gt_country='MD' and gt_region not in ('GA','BA','BD','CU','AN','BR','BS','CA','CL','CM','CR','CS','CT','DO','DR','DU','ED','FA','FL','GL','HI','IA','LE','NI','OC','OR','RE','RI','SD','SI','SO','ST','SV','TA','TE','UN','SN')
OR gt_country='ME' 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')
OR gt_country='MG' and gt_region not in ('A','D','F','M','T','U')
OR gt_country='MH' and gt_region not in ('ALK','ALL','ARN','AUR','EBO','ENI','JAB','JAL','KIL','KWA','L','LAE','LIB','LIK','MAJ','MAL','MEJ','MIL','NMK','NMU','RON','T','UJA','UTI','WTH','WTJ')
OR gt_country='MK' and gt_region not in ('101','102','103','104','105','106','107','108','109',
'201','202','203','204','205','206','207','208','209','210','211',
'301', '303','304', '307','308', '310','311','312','313',
'401','402','403','404','405','406','407','408','409','410',
'501','502','503','504','505','506','507','508','509',
'601','602','603','604','605','606','607','608','609',
'701','702','703','704','705','706',
'801','802','803','804','805','806','807','808','809','810','811','812','813','814','815','816','817')
OR gt_country='ML' and gt_region not in ('1','2','3','4','5','6','7','8','9','10','BKO')
OR gt_country='MM' and gt_region not in ('01','02','03','04','05','06','07','11','12','13','14','15','16','17','18')
OR gt_country='MN' and gt_region not in ('035','037','039','041','043','046','047','049','051','053','055','057','059','061','063','064','065','067','069','071','073','1')
OR gt_country='MR' and gt_region not in ('01','02','03','04','05','06','07','08','09','10','11','12','13','14','15')
OR gt_country='MT' 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','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','65','66','67','68')
OR gt_country='MU' and gt_region not in ('AG','BL','BR','CC','CU','FL','GP','MO','PA','PL','PU','PW','QB','RO','RR','SA','VP')
OR gt_country='MV' and gt_region not in ('00','01','02','03','04','05','07','08','12','13','14','17','20','23','24','25','26','27','28','29','MLE')
OR gt_country='MW' and gt_region not in ('BA','BL','C','CK','CR','CT','DE','DO','KR','KS','LI','LK','MC','MG','MH','MU','MW','MZ','N','NB','NE','NI','NK','NS','NU','PH','RU','S','SA','TH','ZO')
OR gt_country='MX' and gt_region not in ('AGU','BCN','BCS','CAM','CHH','CHP','COA','COL','CMX','DUR','GRO','GUA','HID','JAL','MEX','MIC','MOR','NAY','NLE','OAX','PUE','QUE','ROO','SIN','SLP','SON','TAB','TAM','TLA','VER','YUC','ZAC')
OR gt_country='MY' and gt_region not in ('01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16')
OR gt_country='MZ' and gt_region not in ('MPM','A','B','G','I','L','N','P','Q','S','T')
OR gt_country='NA' and gt_region not in ('CA','ER','HA','KA','KE','KW','KH','KU','OD','OH','OK','ON','OS','OT','OW')
OR gt_country='NE' and gt_region not in ('1','2','3','4','5','6','7','8')
OR gt_country='NG' and gt_region not in ('AB','AD','AK','AN','BA','BE','BO','BY','CR','DE','EB','ED','EK','EN','FC','GO','IM','JI','KD','KE','KN','KO','KT','KW','LA','NA','NI','OG','ON','OS','OY','PL','RI','SO','TA','YO','ZA')
OR gt_country='NI' and gt_region not in ('AN','AS','BO','CA','CI','CO','ES','GR','JI','LE','MD','MN','MS','MT','NS','RI','SJ')
OR gt_country='NL' and gt_region not in ('AW','CW','SX','BQ1','BQ2','BQ3','DR','FL','FR','GE','GR','LI','NB','NH','OV','UT','ZE','ZH')
OR gt_country='NO' and gt_region not in ('03','11','15','18','21','22','30','34','38','42','46','50','54')
OR gt_country='NP' and gt_region not in (/*'1','2','3','4','5',
'BA','BH','DH','GA','JA','KA','KO','LU','MA','ME','NA','RA','SA','SE',*/
'P1','P2','P3','P4','P5','P6','P7')
OR gt_country='NR' and gt_region not in ('01','02','03','04','05','06','07','08','09','10','11','12','13','14')
OR gt_country='NZ' and gt_region not in ('AUK','BOP','CAN','CIT','GIS','HKB','MBH','MWT','NSN','NTL','OTA','STL','TAS','TKI','WGN','WKO','WTC')
OR gt_country='OM' and gt_region not in ('DA','BU','WU','ZA','BJ','SJ','MA','MU','BS','SS','ZU')
OR gt_country='PA' and gt_region not in ('EM','KY','NB','1','2','3','4','5','6','7','8','9','10')
OR gt_country='PE' and gt_region not in ('CAL','AMA','ANC','APU','ARE','AYA','CAJ','CUS','HUC','HUV','ICA','JUN','LAL','LAM','LIM','LOR','MDD','MOQ','PAS','PIU','PUN','SAM','TAC','TUM','UCA','LMA')
OR gt_country='PG' and gt_region not in ('NSB','NCD','CPK','CPM','EBR','EHG','EPW','ESW','GPK','HLA','JWK','MBA','MPL','MPM','MRL','NIK','NPP','SAN','SHM','WBK','WHM','WPD')
OR gt_country='PH' and gt_region not in ('00','01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','40','41','ABR','AGN','AGS','AKL','ALB','ANT','APA','AUR','BAN','BAS','BEN','BIL','BOH','BTG','BTN','BUK','BUL','CAG','CAM','CAN','CAP','CAS','CAT','CAV','CEB','COM','DAO','DAS','DAV','DIN','EAS','GUI','IFU','ILI','ILN','ILS','ISA','KAL','LAG','LAN','LAS','LEY','LUN','MAD','MAG','MAS','MDC','MDR','MOU','MSC','MSR','NCO','NEC','NER','NSA','NUE','NUV','PAM','PAN','PLW','QUE','QUI','RIZ','ROM','SAR','SCO','SIG','SLE','SLU','SOR','SUK','SUN','SUR','TAR','TAW','WSA','ZAN','ZAS','ZMB','ZSI')
OR gt_country='PK' and gt_region not in ('IS','GB','JK','BA','KP','PB','SD')
/*
OR gt_country='PL' and gt_region not in ('DS','KP','LB','LD','LU','MA','MZ','OP','PD','PK','PM','SK','SL','WN','WP','ZP')
*/
OR gt_country='PL' and gt_region not in ('02','04','08','10','06','12','14','16','20','18','22','26','24','28','30','32')
OR gt_country='PS' and gt_region not in ('BTH','DEB','GZA','HBN','JEM','JEN','JRH','KYS','NBS','NGZ','QQA','RBH','RFH','SLT','TBS','TKM')
OR gt_country='PT' and gt_region not in ('01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','20','30')
OR gt_country='PW' and gt_region not in ('002','004','010','050','100','150','212','214','218','222','224','226','227','228','350','370')
OR gt_country='PY' and gt_region not in ('1','10','11','12','13','14','15','16','19','2','3','4','5','6','7','8','9','ASU')
OR gt_country='QA' and gt_region not in ('DA','KH','MS','RA','SH','US','WA','ZA')
OR gt_country='RO' and gt_region not in ('AB','AG','AR','B','BC','BH','BN','BR','BT','BV','BZ','CJ','CL','CS','CT','CV','DB','DJ','GJ','GL','GR','HD','HR','IF','IL','IS','MH','MM','MS','NT','OT','PH','SB','SJ','SM','SV','TL','TM','TR','VL','VN','VS')
OR gt_country='RS' and gt_region not in ('KM','VO','00','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')
OR gt_country='RU' and gt_region not in ('AD','AL','BA','BU','KK','DA','IN','KB','KL','KC','KR','KO','ME','MO','SE','SA','TA','CE','CU','TY','UD','AMU','ARK','AST','BEL','BRY','CHE','IRK','IVA','KEM','KGD','KGN','KIR','KLU','KOS','KRS','LEN','LIP','MAG','MOS','MUR','NGR','NIZ','NVS','OMS','ORE','ORL','PNZ','PSK','ROS','RYA','SAK','SAM','SAR','SMO','SVE','TAM','TOM','TUL','TVE','TYU','ULY','VGG','VLA','VLG','VOR','YAR','ALT','KAM','KDA','KHA','KYA','PER','PRI','STA','ZAB','MOW','SPE','CHU','KHM','NEN','YAN','YEV')
OR gt_country='RW' and gt_region not in ('02','03','04','05','01')
OR gt_country='SA' and gt_region not in ('01','02','03','04','05','06','07','08','09','10','11','12','14')
OR gt_country='SB' and gt_region not in ('CE','CH','CT','GU','IS','MK','ML','RB','TE','WE')
OR gt_country='SC' 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')
OR gt_country='SD' and gt_region not in ('DC','DE','DN','DS','DW','GD','GK','GZ','KA','KH','KN','KS','NB','NO','NR','NW','RS','SI')
OR gt_country='SE' and gt_region not in ('AB','AC','BD','C','D','E','F','G','H','I','K','M','N','O','S','T','U','W','X','Y','Z')
OR gt_country='SG' and gt_region not in ('01','02','03','04','05')
OR gt_country='SH' and gt_region not in ('AC','HL','TA')
OR gt_country='SI' and gt_region not in ('001','002','003','004','005','006','007','008','009','010','011','012','013','014','015','016','017','018','019','020','021','022','023','024','025','026','027','028','029','030','031','032','033','034','035','036','037','038','039','040','041','042','043','044','045','046','047','048','049','050','051','052','053','054','055','056','057','058','059','060','061','062','063','064','065','066','067','068','069','070','071','072','073','074','075','076','077','078','079','080','081','082','083','084','085','086','087','088','089','090','091','092','093','094','095','096','097','098','099','100','101','102','103','104','105','106','107','108','109','110','111','112','113','114','115','116','117','118','119','120','121','122','123','124','125','126','127','128','129','130','131','132','133','134','135','136','137','138','139','140','141','142','143','144','146','147','148','149','150','151','152','153','154','155','156','157','158','159','160','161','162','163','164','165','166','167','168','169','170','171','172','173','174','175','176','177','178','179','180','181','182','183','184','185','186','187','188','189','190','191','192','193','194','195','196','197','198','199','200','201','202','203','204','205','206','207','208','209','210','211','212','213')
OR gt_country='SK' and gt_region not in ('BC','BL','KI','NI','PV','TA','TC','ZI')
OR gt_country='SL' and gt_region not in ('E','N','NW','S','W')
OR gt_country='SM' and gt_region not in ('01','02','03','04','05','06','07','08','09')
OR gt_country='SN' and gt_region not in ('DB','DK','FK','KA','KD','KE','KL','LG','MT','SE','SL','TC','TH','ZG')
OR gt_country='SO' and gt_region not in ('AW','BK','BN','BR','BY','GA','GE','HI','JD','JH','MU','NU','SA','SD','SH','SO','TO','WO')
OR gt_country='SR' and gt_region not in ('BR','CM','CR','MA','NI','PM','PR','SA','SI','WA')
OR gt_country='SS' and gt_region not in ('BN','BW','EC','EE','EW','JG','LK','NU','UY','WR')
OR gt_country='ST' and gt_region not in ('P','01','02','03','04','05','06')
OR gt_country='SV' and gt_region not in ('AH','CA','CH','CU','LI','MO','PA','SA','SM','SO','SS','SV','UN','US')
OR gt_country='SY' and gt_region not in ('DI','DR','DY','HA','HI','HL','HM','ID','LA','QU','RA','RD','SU','TA')
OR gt_country='SZ' and gt_region not in ('HH','LU','MA','SH')
OR gt_country='TD' and gt_region not in ('BA','BG','BO','CB','EE','EO','GR','HL','KA','LC','LO','LR','MA','MC','ME','MO','ND','OD','SA','SI','TA','TI','WF')
OR gt_country='TG' and gt_region not in ('C','K','M','P','S')
OR gt_country='TH' and gt_region not in ('S','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','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','60','61','62','63','64','65','66','67','70','71','72','73','74','75','76','77','80','81','82','83','84','85','86','90','91','92','93','94','95','96','S')
OR gt_country='TJ' and gt_region not in ('GB','KT','SU','DU','RA')
OR gt_country='TL' and gt_region not in ('AL','AN','BA','BO','CO','DI','ER','LA','LI','MF','MT','OE','VI')
OR gt_country='TM' and gt_region not in ('A','B','D','L','M','S')
OR gt_country='TN' and gt_region not in ('11','12','13','14','21','22','23','31','32','33','34','41','42','43','51','52','53','61','71','72','73','81','82','83')
OR gt_country='TO' and gt_region not in ('01','02','03','04','05')
OR gt_country='TR' 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','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','65','66','67','68','69','70','71','72','73','74','75','76','77','78','79','80','81')
OR gt_country='TT' and gt_region not in ('ARI','CHA','CTT','DMN','MRC','PED','POS','PRT','PTF','SFO','SGE','SIP','SJL','TOB','TUP')
OR gt_country='TV' and gt_region not in ('FUN','NIT','NUI','NKF','NKL','NMA','NMG','VAI')
OR gt_country='TW' and gt_region not in ('CHA','CYQ','HSQ','HUA','KIN','LIE','MIA','NAN','PEN','PIF','TTT','ILA','YUN','KHH','NWT','TXG','TNN','TPE','TAO','CYI','HSZ','KEE')
OR gt_country='TZ' 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','29','30','31')
OR gt_country='UA' and gt_region not in ('05','07','09','12','14','18','21','23','26','30','32','35','40','46','48','51','53','56','59','61','63','65','68','71','74','77','43')
OR gt_country='UG' and gt_region not in ('101','102','103','104','105','106','107','108','109','110','111','112','113','114','115','116','117','118','119','120','121','122','123','124','125','126',
'201','202','203','204','205','206','207','208','209','210','211','212','213','214','215','216','217','218','219','220','221','222','223','224','225','226','227','228','229','230','231','232','233','234','235','236',
'301','302','303','304','305','306','307','308','309','310','311','312','313','314','315','316','317','318','319','320','321','322','323','324','325','326','327','328','329','330','331','332','333','334',
'401','402','403','404','405','406','407','408','409','410','411','412','413','414','415','416','417','418','419','420','421','422','423','424','425','426','427','428','429','430','431','432',
'C','E','N','W')
OR gt_country='UM' and gt_region not in ('67','71','76','79','81','84','86','89','95')
OR gt_country='US' and gt_region not in ('AK','AL','AR','AS','AZ','CA','CO','CT','DC','DE','FL','GA','GU','HI','IA','ID','IL','IN','KS','KY','LA','MA','MD','ME','MI','MN','MO','MP','MS','MT','NC','ND','NE','NH','NJ','NM','NV','NY','OH','OK','OR','PA','PR','RI','SC','SD','TN','TX','UM','UT','VA','VI','VT','WA','WI','WV','WY')
OR gt_country='UY' and gt_region not in ('AR','CA','CL','CO','DU','FD','FS','LA','MA','MO','PA','RN','RO','RV','SA','SJ','SO','TA','TT')
OR gt_country='UZ' and gt_region not in ('AN','BU','FA','JI','KH','NG','NW','QA','QR','SA','SI','SU','TK','TO','XO')
OR gt_country='VC' and gt_region not in ('01','02','03','04','05','06')
OR gt_country='VE' and gt_region not in ('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','R','S','T','U','V','W','X','Y','Z')
OR gt_country='VN' and gt_region not in ('CT','DN','HN','HP','SG','01','02','03','04','05','06','07','09','13','14','15','18','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','39','40','41','43','44','45','46','47','49','50','51','52','53','54','55','56','57','58','59','60','61','62','63','66','67','68','69','70','71','72','73')
OR gt_country='VU' and gt_region not in ('MAP','PAM','SAM','SEE','TAE','TOB')
OR gt_country='WS' and gt_region not in ('AA','AL','AT','FA','GE','GI','PA','SA','TU','VF','VS')
OR gt_country='YE' and gt_region not in ('AB','AD','AM','BA','DA','DH','HD','HJ','HU','IB','JA','LA','MA','MR','MW','RA','SD','SH','SN','TA','SA','SU')
OR gt_country='ZA' and gt_region not in ('EC','FS','GP','LP','MP','NC','KZN','NW','WC')
OR gt_country='ZM' and gt_region not in ('01','02','03','04','05','06','07','08','09','10')
OR gt_country='ZW' and gt_region not in ('BU','HA','MA','MC','ME','MI','MN','MS','MV','MW')
) 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.
All SQL code is licensed under CC0 License.
Query status: complete
Executed in 384.32 seconds as of Sat, 28 Nov 2020 14:38:22 UTC.