https://leetcode.com/problems/duplicate-emails/
Duplicate Emails - LeetCode
Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.
leetcode.com
email이 중복된 id를 출력하면 되는 문제
SELECT
email AS Email
FROM Person
GROUP BY email
HAVING COUNT(email) > 1
;
GROUP BY + HAVING을 활용하여 간단하게 풀이할 수 있다.
'Programming > LeetCode' 카테고리의 다른 글
[LeetCode] Department Highest Salary (0) | 2022.03.31 |
---|---|
[LeetCode] Customers Who Never Order (0) | 2022.03.31 |
[LeetCode] Employees Earning More Than Their Managers (0) | 2022.03.31 |
[LeetCode] Consecutive Numbers (MySQL) (0) | 2022.03.31 |
[LeetCode] Combine Two Tables (MySQL) (0) | 2022.03.31 |
댓글