WHERE fu.firmname != 'Undisclosed Firm';
--298688
Now count the distinct firms, funds and portcokeys
SELECT COUNT(DISTINCT firmname) FROM fundbasefirmbaseroundlinegoodkeys;
--8956
SELECT COUNT(DISTINCT fundname) FROM fundbasefirmbaseroundlinegoodkeys;
--16907
SELECT COUNT(*) FROM (SELECT DISTINCT coname, statecode, datefirstinv FROM fundbasefirmbaseroundlinegoodkeys) as gfoo;
--42093
You can see that there are many keys that do not exist in the other datasets.
==Cleaning roundline==