Changes

Jump to navigation Jump to search
658 bytes added ,  16:35, 20 July 2018
==Process For Creating the PortCoExits Table==
First I looked for the PortCos that were in both the MAs and the IPOs. I did this using:
DROP TABLE IPOMAForReview;
CREATE TABLE IPOMAForReview
SELECT A.*, B.targetname, B.targetstate, B.announcedate
FROM IPOClean AS A
JOIN MAClean AS B ON A.coname=B.coname AND A.statecode=B.statecode AND A.datefirstinv=B.datefirstinv;
 
I then wrote a query to check which date was lower and used that to indicate whether I chose the company to have undergone an MA or an IPO in the column MSvsIPO. A 0 in the column represented an MA being chosen and a 1 represented an IPO being chosen.
DROP TABLE IPOMASelected;
CREATE TABLE IPOMASelected AS
SELECT *,
CASE
WHEN issuedate < announceddate THEN 1 ELSE 0 END AS MAvsIPO
FROM IPOMAForReview;
--92
158

edits

Navigation menu