SELECT DISTINCT uid, 'activity1' AS sctivity FROM exam_record WHERE score >= 85 AND YEAR(submit_time)=2021 UNION SELECT DISTINCT uid, 'activity2' AS sctivity FROM ( SELECT uid, start_time, submit_time, score, TIMESTAMPDIFF(MINUTE,start_time,submit_time) AS spend_time, ...