考察偏移函数+窗口函数lag(字段名,偏移行数n),向下偏移lead(字段名,偏移行数n),向下偏移 select user_id ,date ,lead(date,1)over(partition by user_id order by date) as nextdate from questions_pass_record order by user_id,date