-- start movesmall (3) seatmap
SET @myDate = "2018-03-23";

UPDATE bm.single_seats SET y=y+3 WHERE seat_id=(SELECT (select id from bm.seats as test2 where event_id = test1.id limit 1) 
FROM bm.events as test1 where start_date like @myDate and x < 17);

UPDATE bm.single_seats SET y=y+1
WHERE seat_id=(SELECT (select id from bm.seats as test2 where event_id = test1.id limit 1) 
FROM bm.events as test1 where start_date like @myDate and y > 13 and x < 17);

UPDATE bm.single_seats SET y=y-1
WHERE seat_id=(SELECT (select id from bm.seats as test2 where event_id = test1.id limit 1) 
FROM bm.events as test1 where start_date like @myDate and y > 17 and x < 17);

SET @myDate = "2018-03-16";

UPDATE bm.single_seats SET y=y+3 WHERE seat_id=(SELECT (select id from bm.seats as test2 where event_id = test1.id limit 1) 
FROM bm.events as test1 where start_date like @myDate and x < 17);

UPDATE bm.single_seats SET y=y+1
WHERE seat_id=(SELECT (select id from bm.seats as test2 where event_id = test1.id limit 1) 
FROM bm.events as test1 where start_date like @myDate and y > 13 and x < 17);

UPDATE bm.single_seats SET y=y-1
WHERE seat_id=(SELECT (select id from bm.seats as test2 where event_id = test1.id limit 1) 
FROM bm.events as test1 where start_date like @myDate and y >= 17  and x < 17);

SET @myDate = "2018-06-09";

UPDATE bm.single_seats SET y=y+3 WHERE seat_id=(SELECT (select id from bm.seats as test2 where event_id = test1.id limit 1) 
FROM bm.events as test1 where start_date like @myDate and x < 17);

UPDATE bm.single_seats SET y=y+1
WHERE seat_id=(SELECT (select id from bm.seats as test2 where event_id = test1.id limit 1) 
FROM bm.events as test1 where start_date like @myDate and y > 13 and x < 17);

UPDATE bm.single_seats SET y=y-1
WHERE seat_id=(SELECT (select id from bm.seats as test2 where event_id = test1.id limit 1) 
FROM bm.events as test1 where start_date like @myDate and y >= 17  and x < 17);

SET @myDate = "2018-03-10";

UPDATE bm.single_seats SET y=y+3 WHERE seat_id=(SELECT (select id from bm.seats as test2 where event_id = test1.id limit 1) 
FROM bm.events as test1 where start_date like @myDate and x < 17);

UPDATE bm.single_seats SET y=y+1
WHERE seat_id=(SELECT (select id from bm.seats as test2 where event_id = test1.id limit 1) 
FROM bm.events as test1 where start_date like @myDate and y > 13 and x < 17);

UPDATE bm.single_seats SET y=y-1
WHERE seat_id=(SELECT (select id from bm.seats as test2 where event_id = test1.id limit 1) 
FROM bm.events as test1 where start_date like @myDate and y >= 17  and x < 17);

SET @myDate = "2018-02-23";

UPDATE bm.single_seats SET y=y+3 WHERE seat_id=(SELECT (select id from bm.seats as test2 where event_id = test1.id limit 1) 
FROM bm.events as test1 where start_date like @myDate and x < 17);

UPDATE bm.single_seats SET y=y+1
WHERE seat_id=(SELECT (select id from bm.seats as test2 where event_id = test1.id limit 1) 
FROM bm.events as test1 where start_date like @myDate and y > 13 and x < 17);

UPDATE bm.single_seats SET y=y-1
WHERE seat_id=(SELECT (select id from bm.seats as test2 where event_id = test1.id limit 1) 
FROM bm.events as test1 where start_date like @myDate and y >= 17  and x < 17);

SET @myDate = "2018-05-12";

UPDATE bm.single_seats SET y=y+3 WHERE seat_id=(SELECT (select id from bm.seats as test2 where event_id = test1.id limit 1) 
FROM bm.events as test1 where start_date like @myDate and x < 17);

UPDATE bm.single_seats SET y=y+1
WHERE seat_id=(SELECT (select id from bm.seats as test2 where event_id = test1.id limit 1) 
FROM bm.events as test1 where start_date like @myDate and y > 13 and x < 17);

UPDATE bm.single_seats SET y=y-1
WHERE seat_id=(SELECT (select id from bm.seats as test2 where event_id = test1.id limit 1) 
FROM bm.events as test1 where start_date like @myDate and y >= 17  and x < 17);

SET @myDate = "2018-05-05";

UPDATE bm.single_seats SET y=y+3 WHERE seat_id=(SELECT (select id from bm.seats as test2 where event_id = test1.id limit 1) 
FROM bm.events as test1 where start_date like @myDate and x < 17);

UPDATE bm.single_seats SET y=y+1
WHERE seat_id=(SELECT (select id from bm.seats as test2 where event_id = test1.id limit 1) 
FROM bm.events as test1 where start_date like @myDate and y > 13 and x < 17);

UPDATE bm.single_seats SET y=y-1
WHERE seat_id=(SELECT (select id from bm.seats as test2 where event_id = test1.id limit 1) 
FROM bm.events as test1 where start_date like @myDate and y >= 17  and x < 17);

SET @myDate = "2018-04-12";

UPDATE bm.single_seats SET y=y+3 WHERE seat_id=(SELECT (select id from bm.seats as test2 where event_id = test1.id limit 1) 
FROM bm.events as test1 where start_date like @myDate and x < 17);

UPDATE bm.single_seats SET y=y+1
WHERE seat_id=(SELECT (select id from bm.seats as test2 where event_id = test1.id limit 1) 
FROM bm.events as test1 where start_date like @myDate and y > 13 and x < 17);

UPDATE bm.single_seats SET y=y-1
WHERE seat_id=(SELECT (select id from bm.seats as test2 where event_id = test1.id limit 1) 
FROM bm.events as test1 where start_date like @myDate and y >= 17  and x < 17);

UPDATE bm.single_seats SET y=y+1
WHERE seat_id=(SELECT (select id from bm.seats as test2 where event_id = test1.id limit 1) 
FROM bm.events as test1 where start_date like @myDate and x >= 17);

SET @myDate = "2018-04-07";

UPDATE bm.single_seats SET y=y+3 WHERE seat_id=(SELECT (select id from bm.seats as test2 where event_id = test1.id limit 1) 
FROM bm.events as test1 where start_date like @myDate and x < 17);

UPDATE bm.single_seats SET y=y+1
WHERE seat_id=(SELECT (select id from bm.seats as test2 where event_id = test1.id limit 1) 
FROM bm.events as test1 where start_date like @myDate and y > 13 and x < 17);

UPDATE bm.single_seats SET y=y-1
WHERE seat_id=(SELECT (select id from bm.seats as test2 where event_id = test1.id limit 1) 
FROM bm.events as test1 where start_date like @myDate and y >= 17  and x < 17);

-- end move small (3) seatmap
