leetcodeSolution to some Leetcode problems written in C++ |
git clone git://git.dimitrijedobrota.com/leetcode.git |
Log | Files | Refs | README | LICENSE |
0626.sql (154B)
0 SELECT F.id, IFNULL(S.student, F.student) AS student 1 FROM Seat F 2 LEFT JOIN Seat S 3 ON F.id % 2 = 1 AND F.id + 1 = S.id 4 OR F.id % 2 = 0 AND F.id - 1 = S.id