0
I am trying to create an event but get the error below:
And my query:
CREATE EVENT insert_count
ON SCHEDULE
EVERY 50 SECOND
COMMENT 'bla bla bla bla bla bla.'
DO BEGIN
INSERT INTO teste (nome, conectado, desconectado)
SELECT parceiro.nomeP AS 'Parceiro',
SUM(di.connectedOr = 'true') AS 'ClientesConectados',
SUM(di.connectedOr = 'false') AS 'ClientesDesconectados'
FROM vpn AS di
JOIN parceiro
ON parceiro.codParceiro = di.idpartner
WHERE di.comName REGEXP 'skytef-'
GROUP BY di.idpartner
END
SQL Error (1064): You have an error in your SQL syntax; check the manual that Corresponds to your Mysql server version for the right syntax to use near 'delimiter' at line 1
– Cesar Augusto