select
a.id ,
b.id ,a.card_num from
(select id ,process_time,card_num, @
num1 := @
num1 + 1 as row_number
from (SELECT @
num1:=1) r1, you_table_name order by card_num,process_time ) a ,
(select id ,process_time,card_num, @
num2 := @
num2 + 1 as row_number
from (SELECT @
num2:=0) r2, you_table_name order by card_num,process_time) b
where a.row_number=b.row_number and a.card_num=b.card_num and b.process_time-a.process_time>1;
献丑了。