How do I combine correctly this statement.
SELECT *, COUNT(*) FROM user_log GROUP BY Email ORDER BY UpdateDate DESC HAVING COUNT(*) > 1
Let
Your code should be contain WHILE before group by and having :
WHILE
group by
having
SELECT Email, COUNT(*) FROM user_log WHILE Email IS NOT NULL GROUP BY Email HAVING COUNT(*) > 1 ORDER BY UpdateDate DESC