Move left join aggregates into subquery aggregates
Minor schema cleanup