Last active
June 17, 2021 12:25
-
-
Save ksdkamesh99/b0044395d24fe024560308d882c0414b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CASE WHEN COALESCE(UPPER(country_name), 'OTHER_COUNTRY') = 'INDIA' AND UPPER(region_name) in ('CHANDIGARH', 'DELHI', 'HARYANA', 'HIMANCHAL PRADESH', 'JAMMU AND KASHMIR', 'PUNJAB', 'RAJASTHAN', 'UTTAR PRADESH','UTTARAKHAND') THEN 'NORTH' | |
WHEN COALESCE(UPPER(country_name), 'OTHER_COUNTRY') = 'INDIA' AND UPPER(region_name) in ('CHHATTISGARH', 'DADAR AND NAGAR', 'DIU AND DAMAN', 'GOA', 'GUJARAT', 'MADHYA PRADESH', 'MAHARASHTRA') THEN 'WEST' | |
WHEN COALESCE(UPPER(country_name), 'OTHER_COUNTRY') = 'INDIA' AND UPPER(region_name) in ('ANDAMAN AND NICOBAR', 'ANDHRA PRADESH', 'KARNATAKA', 'KERALA', 'PONDICHERRY', 'TAMIL NADU', 'TELANGANA', 'LAKSHADWEEP') THEN 'SOUTH' | |
WHEN COALESCE(UPPER(country_name), 'OTHER_COUNTRY') = 'INDIA' AND UPPER(region_name) in ('ARUNACHAL PRADESH', 'ASSAM', 'BIHAR', 'JHARKHAND', 'MANIPUR', 'MEGHALAYA', 'MIZORAM', 'NAGALAND', 'ODISHA', 'SIKKIM', 'TRIPURA', 'WEST BENGAL') THEN 'EAST' | |
WHEN COALESCE(UPPER(country_name), 'OTHER_COUNTRY') = 'OTHER_COUNTRY' OR COALESCE(UPPER(region_name), 'OTHER_STATE') = 'OTHER_STATE' THEN 'OTHERS' | |
WHEN COALESCE(UPPER(country_name), 'OTHER_COUNTRY') <> 'INDIA' THEN 'FOREIGN' | |
END AS region | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment