My first accepted SQL solution, using GROUP BY in 845 ms, thank God...


  • 3
    C
    # Write your MySQL query statement below
    select email 
    from( 
         select 
               email, 
               count(*) as c
         from Person
         group by email
    ) a
    where a.c > 1;
    

    We should review and think over other guys' solution frequently, especially for beginners. I think it's significantly helpful~~


Log in to reply
 

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