==Name Based Matching companybase keys to mas keys==
Before attempting to match companybasecore with mascore you need a clean table or you will get many errors in the matcher output file. Luckily the core files tables should already contain distinct keys if you've followed the process. However running the matcher will still yield many errors. So we will filter the mas keys some more. The first thing is to remove mas keys (targetname, announceddate, targetstatecode) where the announceddate falls within the same week. Keep the key that has the minimum announceddate and discard the higher date. Shown below:
DROP TABLE maskeys;
CREATE TABLE maskeys AS