--92
I then pulled out the IPOs that were only IPOs and MAs that were only MAs. I also added in a column that indicated whether a company underwent an IPO or a MA.
DROP TABLE ExitKeysCleanIPONoExitIPONoConflict; CREATE TABLE ExitKeysCleanIPONoExit IPONoConflict AS SELECT A.*, B.targetname, B.targetstate, B.announceddate1::int as IPOvsMA FROM IPOCleanNoDups AS A LEFT JOIN MACleanNoDups AS B ON A.coname=B.Coname coname AND A.statecode=B.statecode AND A.datefirstinv=B.datefirstinv WHERE B.statecode IS NULL AND B.coname IS NULL AND B.datefirstinv IS NULL; --20492044
DROP TABLE ExitKeysCleanMANoExitMANoConflict; CREATE TABLE ExitKeysCleanMANoExit MANoConflict AS SELECT A.*, B.issuername, B.issuerstate, B.issuedate0::int as IPOvsMA FROM MACleanNoDups AS A LEFT JOIN IPOCleanNoDups AS B ON A.coname=B.Coname AND A.statecode=B.statecode AND A.datefirstinv=B.datefirstinv WHERE B.statecode IS NULL AND B.coname IS NULL AND B.datefirstinv IS NULL; --70967079
Since 2141-92=2049 and 7188-92=7096, we know that the duplicate companies were extracted successfully.