==Joining funds with roundline==
==Joining funds, firms, roundline with companybasecore==
DROP TABLE fundbasefirmbaseroundlinegoodkeys;
CREATE TABLE fundbasefirmbaseroundlinegoodkeys AS
SELECT c.coname, c.statecode, c.datefirstinv, r.coname AS rconame, r.statecode AS rstatecode, r.datefirstinv AS rdatefirstinv,
fu.fundname, f.firmname, f.location
FROM companybasecore AS c
INNER JOIN roundline1 AS r ON c.coname = r.coname AND c.statecode = r.statecode AND c.datefirstinv = r.datefirstinv
INNER JOIN fundbasecore AS fu ON fu.fundname = r.fundname
INNER JOIN firmbasecore AS f ON f.firmname = fu.firmname
WHERE fu.firmname != 'Undisclosed Firm';
--298688
==Cleaning roundline==