同时取出主表及主表对应从表的记录个数 sansan

      主表 left join (select 从表外键,count(外键) from 从表 group by 外键)
原文地址:https://www.cnblogs.com/liushanshan/p/1854225.html