select apply_id ,operation_time as 接单时间,operator_remark as 退回原因 from (select ol_id,apply_id,before_status,operator_remark,operation_time from `operation` where before_status in (10002200,10005200) order by apply_id,before_status) aa group by apply_id,before_status;