title: MySQL delete with subquery gives syntax error
body: <p>In MySQL I have a table ('ertek') with 2 fields:
  'id': int, autoincrement
  'mert': int</p>
  
  <p>I'd like to delete rows where the value of 'mert' is lower than in the previous row, if I order the table by id ASC.</p>
  
  <p>My query:</p>
  
  <pre><code>DELETE FROM ertek as t WHERE EXISTS (SELECT * FROM ertek AS t2 WHERE t2.id=t.id-1 AND t2.mert&gt;t.mert)
  </code></pre>
  
  <p>I receive this 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 'as t WHERE
  EXISTS (SELECT * FROM ertek AS t2 WHERE t2.id=(t.id)-1 AND t2.mert>t' at line 1 </p>
  
  <p>Please help.</p>