Skip to content

Commit 3e00585

Browse files
committed
Upload 161
1 parent ea381cc commit 3e00585

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ Because this project necessitated a framework to enable consistent daily practic
189189
| 158 | [Calculate Special Bonus](https://leetcode.com/problems/calculate-special-bonus/description/) | [Solution](solutions/158_calculate_special_bonus.md) | LeetCode | Easy | |
190190
| 159 | [The Latest Login in 2020](https://leetcode.com/problems/the-latest-login-in-2020/description/) | [Solution](solutions/159_the_latest_login_in_2020.md) | LeetCode | Easy | |
191191
| 160 | [Employees With Missing Information](https://leetcode.com/problems/employees-with-missing-information/description/) | [Solution](solutions/160_employees_with_missing_information.md) | LeetCode | Easy | FULL JOIN |
192+
| 161 | [Delete Duplicate Emails](https://leetcode.com/problems/delete-duplicate-emails/description/) | [Solution](solutions/161_delete_duplicate_emails.md) | LeetCode | Easy | |
192193
<!-- Index End - WARNING: Do not delete or modify this markdown comment. -->
193194
<!--- cSpell:enable --->
194195

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# SQL Everyday \#161
2+
3+
## Delete Duplicate Emails
4+
5+
Site: LeetCode\
6+
Difficulty per Site: Easy
7+
8+
## Problem
9+
10+
Write a solution to *delete* all duplicate emails, keeping only one unique email with the smallest `id`. [[Full Description](https://leetcode.com/problems/delete-duplicate-emails/description/)]
11+
12+
## Submitted Solution
13+
14+
```sql
15+
-- Submitted Solution
16+
DELETE FROM Person
17+
WHERE id NOT IN (
18+
SELECT MIN(id)
19+
FROM Person
20+
GROUP BY email
21+
)
22+
;
23+
```
24+
25+
## Site Solution
26+
27+
```sql
28+
-- LeetCode Solution
29+
-- TBD
30+
```
31+
32+
## Notes
33+
34+
TBD
35+
36+
## NB
37+
38+
TBD
39+
40+
Go to [Index](../?tab=readme-ov-file#index)\
41+
Go to [Overview](../?tab=readme-ov-file)

0 commit comments

Comments
 (0)