892ms group by solution

  • 1
    SELECT Email
    FROM (SELECT Email, COUNT(Email) AS numOfEmail
        FROM Person
        GROUP BY Email) AS T1 
    WHERE T1.numOfEmail > 1

  • 1

    What's the difference between your solution and "SELECT Email FROM Person GROUP BY Email Having COUNT(*)>1"?
    Is your solution always faster than the one described by me

  • 0

    It may related to network. When I had ran the same code several times it returned me the different result of the time taken by program. Am I wrong?

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.