The remaining records are stored in ptoassigneend_us_temp5.
====Output: ptoassigneend_us_identify5====
One problem for the REMAINING records is that the postcode is missing.
If we relax the requirements for postcode, we'll get clean data (city that is a city, state that is a state) stored in ptoassigneend_us_identify4.
SQL code:
CREATE TABLE ptoassigneend_us_identify5 AS
SELECT *
FROM ptoassigneend_us_temp5
WHERE city_extracted2 IN (
SELECT citylist
FROM ptoassigneend_us_citylist2) AND
state IS NOT NULL AND state != '';
SELECT 136958
Remaining records are in table ptoassigneend_us_temp6 (SELECT 239837).
===Summary===