笨办法,一环套一环 datediff(sql server 用 ) timestampdiff(mysql用) select a.exam_id,duration,release_time from (select e1.exam_id,(e1.dc-e2.dc)as d from (select exam_id,timestampdiff(second ,start_time,submit_time) as dc ,rank()over(partition by exam_id order by (timestampdiff(second ,start_time,submit_time)...