I want to retrieve all the values from a table in which email ID are not repeated. But when I run below query the execution goes into infinite in mysql.
SELECT * FROM USERS
WHERE EMAIL IN (
SELECT EMAIL
FROM USERS
GROUP BY EMAIL
HAVING COUNT(1) = 1)
I don't understand why this query is going into infinite and is there any other way to get same data without inner query.
I also referred this link in which duplicate values are found link
Thanks.