I think you havn't put the complete script down, but from what I understand, Inner Join or Left Join or a regular Join would be the best thing if you want to combine them. You can also keep it as a separate table to avoid creating duplication of the aggregated field.