This query is marked as a draft This query has been published by Herzi Pinki.

SQL

x
 
use dewiki_p;
select gt_lat, gt_lon, gt_primary, gt_page_id, gt_name, (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','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','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 ('BC','BN','EQ','KA','KE','KN','KW','MA','NK','OR','SK')
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 ('01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19')
OR gt_country='CL' and gt_region not in ('AI','AN','AP','AR','AT','BI','CO','LI','LL','LR','MA','ML','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 ('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='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','10A','10B','10C','10D','10E','10F','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','611','612','613','614','615','621','622','623','624','625','626','627','711','712','713','714','715','721','722','723','724','801','802','803','804','805','806','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','44','49','51','57','59','65','67','70','74','78','82','84','86')
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')
OR gt_country='FM' and gt_region not in ('KSA','PNI','TRK','YAP')
OR gt_country='FR' and gt_region not in ('A','B','C','D','G','I','K','L','M','N','O','P','Q','S','T','V', /*obsolete*/ 'E','F','H','J','R','U',
'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','BDF','BDG','BEN','BEX','BFS','BGE','BGW','BIR','BKM','BLA','BLY','BMH','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','POL','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')
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 ('AA','AH','BA','CP','EP','NP','TV','UE','UW','WP')
OR gt_country='GL' and gt_region not in ('KU','QA','QE','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','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')
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 ('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','JK','JH','KA','KL','MP','MH','MN','ML','MZ','NL','OR','PB','RJ','SK','TN','TG','TR','UT','UP','WB','AN','CH','DN','DD','DL','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 ('01','02','03','04','05','06','07','08','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='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','AO','AP','AQ','AR','AT','AV','BA','BG','BI','BL','BN','BO','BR','BS','BT','BZ','CA','CB','CE','CH','CI','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','OG','OR','OT','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','SV','TA','TE','TN','TO','TP','TR','TS','TV','UD','VA','VB','VC','VE','VI','VR','VS','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')
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','KAR','KUS','KZY','MAN','PAV','SEV','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','04','05','06','07','08','09','10','11')
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')
OR gt_country='LU' and gt_region not in ('D','G','L')
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','13','14','15','16','AGD','ASZ','AZI','BAH','BEM','BER','BES','BOD','BOM','CAS','CHE','CHI','ERR','ESI','ESM','FES','FIG','GUE','HAJ','HOC','IFR','JDI','JRA','KEN','KES','KHE','KHN','KHO','LAA','LAR','MAR','MEK','MEL','NAD','OUA','OUJ','OUD','RBA','SAF','SEF','SET','SIK','TAO','TAR','TAT','TAZ','TET','TIZ','TNG','TNT')
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 ('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','78','79','80','81','82','83','84')
OR gt_country='ML' and gt_region not in ('1','2','3','4','5','6','7','8','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','NKC')
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','DIF','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 ('01','02','03','04','05','06','07','08','09','10','11','12','14','15','16','17','18','19','20','21','22')
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')
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 ('N','S','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','TA')
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='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','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','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')
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','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','S')
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')
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','ETO','PED','POS','PRT','PTF','RCM','SFO','SGE','SIP','SJL','TUP','WTO')
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')
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','201','202','203','204','205','206','207','208','209','210','211','212','213','214','215','216','217','218','219','220','221','222','223','224','301','302','303','304','305','306','307','308','309','310','311','312','313','314','315','316','317','318','319','320','321','401','402','403','404','405','406','407','408','409','410','411','412','413','414','415','416','417','418','419','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')
OR gt_country='ZA' and gt_region not in ('EC','FS','GT','LP','MP','NC','NL','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')
;
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.

Checking query status...