mysql查詢相鄰數據時間差

select A.user_id,A.punch_time,TIMESTAMPDIFF(SECOND,A.punch_time,B.punch_time) sub_seconds from(     select a.*,(@i := @i + 1) as ord_num from t_punch_cade a,(select @i := 1) d order by user_id,punch_t
相關文章
相關標籤/搜索