exchange_seats.sql
SQLite 3.53
Not run yet
+ 6 hidden
Input
seat_plan seat_id student_name 1 noor 2 ilse 3 tomas 4 priya 5 kenji
Expected
[{"seat_id": 1, "student_name": "ilse"}, {"seat_id": 2, "student_name": "noor"}, {"seat_id": 3, "student_name": "priya"}, {"seat_id": 4, "student_name": "tomas"}, {"seat_id": 5, "student_name": "kenji"}]Seats 1 and 2 swap, so do 3 and 4. Seat 5 is the odd one out: kenji has no partner and stays in seat 5.