how would I match a telephone number to it's nearest area code. For example I would like to match 001 876 432 987 to it's nearest country code which is Jamaica and not the shortest match which is US and have only one result.
area_code | country
001| USA
001876 | Jamaica
WhaDaYaTink?
area_code | country
001| USA
001876 | Jamaica
WhaDaYaTink?