You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# MYSQL Query Accepted
SELECT ( CASE
WHEN id%2 != 0 AND id != counts THEN id+1
WHEN id%2 != 0 AND id = counts THEN id
ELSE id-1
END) AS id, student
FROM seat, (select count(*) as counts from seat)
AS seat_counts
ORDER BY id ASC
# MYSQL Query Accepted
SELECT ( CASE
WHEN id%2 != 0 AND id != counts THEN id+1
WHEN id%2 != 0 AND id = counts THEN id
ELSE id-1
END) AS id, student
FROM seat, (select count(*) as counts from seat)
AS seat_counts
ORDER BY id ASC
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Explanation