# Write your MySQL query statement below
select @rank:=@rank+1 as id,student from
( select *
from
(
(select (id-1) as id,student from seat where id%2=0)
union all
(select (id+1) as id,student from seat where id%2!=0)
) t order by id asc
select @rank:=@rank+1 as id,student from
( select *
from
(
(select (id-1) as id,student from seat where id%2=0)
union all
(select (id+1) as id,student from seat where id%2!=0)
) t order by id asc
) res,(select @rank:=0) p
看完的朋友招个手点个赞,不然我真的感觉优快云是个单机游戏