SELECT COUNT(*) FROM branchofficesbase WHERE undisclosedflag = 0;
--9452
SELECT COUNT(*) FROM (SELECT DISTINCT firmname, bocity , bozip FROM branchofficesbase WHERE undisclosedflag = 0)a;
--9448
DROP TABLE branchofficecore;
SELECT * FROM branchofficesbase WHERE undisclosedflag = 0;
--9452
SELECT COUNT(*) FROM (SELECT DISTINCT firmname, bozip FROM branchofficecore WHERE bocity IS NOT NULL) AS T;
--1964
SELECT COUNT(*) FROM (SELECT DISTINCT firmname, bocity FROM branchofficecore WHERE bocity IS NOT NULL) AS T;
--1963
There are no duplicates in firmbasecore, aside from 'Amundi', which has 2 branch offices in the same city (Bucharest) but different zip codes, which is why there are different counts when we use firmname/firmname,bocity as a key vs firmname, bozip.
==Cleaning fundbase==