---
# System prepended metadata

title: 196. Delete Duplicate Emails
tags: [easy, SQL]

---

# 196. Delete Duplicate Emails
###### tags: `SQL` `easy`
![](https://i.imgur.com/qo7c2dO.png)
![](https://i.imgur.com/w9PBoGW.png)
要將重複的信箱刪除同時保留最小ID
故先使用select找出最小ID
再找出id中沒有在group by email中出現的刪除
![](https://i.imgur.com/dzV7Mgq.png)
![](https://i.imgur.com/4Rw2MN5.png)

