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

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);

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

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);

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

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);

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

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);


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

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);

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

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-23";

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);

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

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);

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

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);

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

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);
