 <p>You forgot to put the <code>END</code> delimiter</p> <pre><code>DELIMITER @ CREATE EVENT update_stats ON SCHEDULE EVERY 15 MINUTE ON COMPLETION PRESERVE ENABLE DO BEGIN UPDATE stats JOIN temp_stats ON stats.unique_key = temp_stats.unique_key SET stats.clicks = stats.clicks + temp_stats.clicks; TRUNCATE temp_stats; END@ DELIMITER ; </code></pre>