I am a newbie on SQL,share my solution(no "having",no "JOIN")


  • 1
    Z
    SELECT CountTable.Email FROM (
    SELECT Person.Email,COUNT(Person.Email) AS CountNum
    	FROM Person
    	GROUP BY Person.Email
    ) AS CountTable WHERE CountTable.CountNum>1;
    

  • 0
    T

    I tried this way too. Mine was not accepted because I did not rename the new table in the (). (But it was accepted somewhere else...)


Log in to reply
 

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