Since the city list is not long, I briefly cleaned the list by hand, and stored it in ptoassigneend_us_citylist2.
* Actually, we can buy a full list of U.S. cities online: https://www.uscitieslist.org/. Just update the ptoassigneend_us_citylist and follow the following steps.
Then, similar ====Output: ptoassigneend_us_identify3==== Similar to Section 4.2, identify clean data that meets all the requirements: postcode_extracted with 5-4 or 5 digits, state not null or not spaces, and city_extracted in ptoasigneend_us_citylist2.
SQL Code:
SELECT 664524
* Outputtable: ptoassigneend_us_identify3
Table "public.ptoassigneend_us_identify3"
Remaining records are in table ptoassigneend_us_temp4.
====Output: ptoassigneend_us_identify4====
One problem for the REMAINING records is that the postcode is missing.