你可以在嵌套一层,统计你想要的数量
select count(*)
from(
SELECT trainingcourseid,courseid,lectuerid,teachtimebegin,teachtimeendFROM t_training_course WHERE lectuerid='lc0sxzgcnc3ffb01'GROUP BY lectuerid,courseid,trainingcourseid,DATE_FORMAT(teachtimebegin,'%m/%d/%Y') ORDER BY teachtimebegin ASC) group by XX