문제) Leetcode - SQL - Duplicate Emails
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
중복된 이메일을 찾는 문제였습니다. Group by로 email 별로 묶은 후, count(email)을 통해 개수가 1이 아닌 것을 출력했습니다.
풀이)
select email
from Person
group by email
having count(email) != 1
반응형
'Develop > Database' 카테고리의 다른 글
[Leetcode] 183. Customers Who Never Order (MySQL) 문제 및 풀이 (0) | 2021.12.16 |
---|---|
[프로그래머스] SQL 고득점 Kit - 오랜 기간 보호한 동물(1) (MySQL) 문제 및 풀이 (0) | 2021.12.13 |
[프로그래머스] SQL 고득점 Kit - 있었는데요 없었습니다 (MySQL) 문제 및 풀이 (0) | 2021.12.12 |
[프로그래머스] SQL 고득점 Kit - 없어진 기록 찾기 (MySQL) 문제 및 풀이 (0) | 2021.12.12 |
[Leetcode] 175. Combine Two Tables (MySQL) 문제 및 풀이 (0) | 2021.12.12 |
댓글