If I understand correctly if on average each company has answered 'yes' to ~500 questions, I'll have a two-column, 15-million row table? #### SELECT CG.answer as cgroup, CP.answer as pclass, count(*) FROM CG, CP WHERE CG.company = CP.company GROUP BY cgroup, pclass;