日期:2014-05-17 浏览次数:20553 次
SELECT a.name,isnull(b.ts,0) ts FROM a LEFT JOIN (SELECT bid, count(1) ts FROM b GROUP BY bid) b ON a.id=b.bid