Changes

Jump to navigation Jump to search
725 bytes added ,  12:08, 7 August 2018
--9215
==Create the PortCoExit TableAnd PortCoAliveDead Tables==From consulting with Ed and the VC Database Rebuild wiki, I decided to make the PortCoExit table with an mavsipo, an exitdate, an exited, and an exitvalue column. I use the MAvsIPO column to add in data. It is very important that you have constructed this column. DROP TABLE PortCoExit;
CREATE TABLE PortCoExit AS
SELECT A.coname, A.statecode, A.datefirstinv,
LEFT JOIN MANoDups AS B ON A.targetname=B.targetname AND A.targetstate=B.targetstate AND A.announceddate=B.announceddate
LEFT JOIN IPONoDups AS C ON A.issuername=C.issuer AND A.issuerstate=C.statecode AND A.issuedate=C.issuedate;
--4800048001
The issue that I am currently having is then used this table to build one that the exitvalue column for MAs is always Null, and there are some weird numbers in the table. I will continue has information as to look for thesewhether a company was dead or alive. I have been continuously found this information by checking for duplicates and validity whether a company had undergone an IPO or MA, indicating the company was dead. Alternatively, if the company's date of last investment was more than 5 years ago, I marked the primary keyscompany as dead.  DROP TABLE PortCoAliveDead; CREATE TABLE PortCoAliveDead AS SELECT *, so I do not believe these problems to be due to duplicates datefirstinv as alivedate, extract(year from datefirstinv) as aliveyear, CASE WHEN exitdate IS NOT NULL then exitdate WHEN exitdate IS NULL AND (datelastinv + INTERVAL '5 year') < '7/1/2018' THEN (datelastinv + INTERVAL '5 year') ELSE NULL::date END AS deaddate, CASE WHEN exitdate IS NOT NULL then exityear WHEN exitdate IS NULL AND (datelastinv + INTERVAL '5 year') < '7/1/2018' THEN extract(year from (datelastinv + INTERVAL '5 year')) ELSE NULL::int END AS deadyear FROM PortCoExit; --48001
158

edits

Navigation menu