这道题很综合,有几个关键点 第一点:concat_ws将 日期和tag连接 第二点: group_concat,注意要distinct select uid, sum(CASE WHEN submit_time is null then 1 else 0 end) as incomplete_cnt, count(submit_time) as complete_cnt, group_concat(DISTINCT detail separator ';') FROM (SELECT uid, e1.exam_id, start_time,...