Когда я пытаюсь создать событие в mySQL и набираю этот код, это дает ошибка :
нераспознанный тип оператора в конце
BEGIN
INSERT INTO orders (coinID, action, coinPrice, coinNewPrice, orderTime)
SELECT coinID, action, coinPrice, coinNewPrice, NOW()+1 AS orderTime FROM orders
WHERE coinID IN (SELECT id FROM coin WHERE isActive = 1 ORDER BY id ASC) AND coinID = 1 ORDER BY id DESC LIMIT 1;
INSERT INTO orders (coinID, action, coinPrice, coinNewPrice, orderTime)
SELECT coinID, action, coinPrice, coinNewPrice, NOW()+2 AS orderTime FROM orders
WHERE coinID IN (SELECT id FROM coin WHERE isActive = 1 ORDER BY id ASC) AND coinID = 2 ORDER BY id DESC LIMIT 1;
INSERT INTO orders (coinID, action, coinPrice, coinNewPrice, orderTime)
SELECT coinID, action, coinPrice, coinNewPrice, NOW()+3 AS orderTime FROM orders
WHERE coinID IN (SELECT id FROM coin WHERE isActive = 1 ORDER BY id ASC) AND coinID = 3 ORDER BY id DESC LIMIT 1;
END
создает событие, но не выполняет запрос.