if(*判断条件*,*满足返回*,*不满足返回*) count()计数,无论数值多少,计数+1 sum()总数,计算数值总和 select t1.device_id, university, count(date)qusetion_cnt, sum(if(t2.result = 'right',1,0))right_question_cnt from user_profile t1 left ...