日期:2014-05-17  浏览次数:20728 次

想求同类别的本条记录的in_date_time-上条记录的out_date_time
http://blog.csdn.net/szchenrong/article/details/7441642

------解决方案--------------------
select *,in_date_time-lag(out_date_time)over(partition by operation_room_no order by in_date_time) from tb