simple solution


  • 0
    3
    delete Person
    from Person
    left join (
        select min(ta.Id) as 'minId'
        from Person ta
        group by ta.Email) t on Person.Id=t.minId
    where t.minId is null
    

Log in to reply
 

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