Si ejecuto este ejemplo me da el siguiente error
Incorrect parameters in the call to stored function 'DATE_SUB'
Y si le quito el DATE_SUB
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 'MINUTES) AND NOW()
GROUP BY ip' at line 4