select distinct c1.id from cinema c1, cinema c2
where abs(c1.id-c2.id) =1 and c1.free = 1 and c2.free =1
group by c1.id
select distinct c1.id from cinema c1, cinema c2
where abs(c1.id-c2.id) =1 and c1.free = 1 and c2.free =1
group by c1.id
转载于:https://www.cnblogs.com/ffeng0312/p/9829006.html