日期:2014-05-16  浏览次数:20601 次

记录错位方法

目的:

?

?

?

select 
`value` as `value1`,
value2,
t1.time from testvalue as t1
 left join 
( select `value` as `value2`,time from testvalue 
where time > (select time from testvalue order by time asc limit 1 ) ) as t2 
ON t1.time = t2.time

?

?

?

?