知识是越用越熟练的,怕以后不常用到时又忘了,记在这里。
SELECT count(p.b_id) as totalNum,lcr.* FROM participator p LEFT JOIN lot_con_record lcr ON p.b_id=lcr.id where lcr.is_result=1 GROUP BY p.b_id;