数据结构与算法
🎨 视觉封面LeetCode Duplicate Emails
Problem
Write a SQL query to find all duplicate emails in a table named Person.
+----+---------+
| Id | Email |
+----+---------+
| 1 | [email protected] |
| 2 | [email protected] |
| 3 | [email protected] |
+----+---------+For example, your query should return the following for the above table:
+---------+
| Email |
+---------+
| [email protected] |
+---------+找到重复的Email。
MySQL
SELECT Email FROM Person GROUP BY Email HAVING COUNT(Email) > 1;
分析
无
所有代码开源上传至 GitHub:yummy-code 仓库 · GESP 专题站:GESP WIKI
欢迎加入:C++ GESP/CSP 考级答疑群(688906745) 与 Java/Python交流群(982860385),点击可直接加群。
猜你想读 · 相关文章推荐
LeetCode Combine Two Tables
Problem Table: Person Table: Address Write a SQL query for a report that provides the following information for each person in the Pers...
LeetCode Second Highest Salary
Problem Write a SQL query to get the second highest salary from the Employee table. For example, given the above Employee table, the qu...
LeetCode Customers Who Never Order
Problem Suppose that a website contains two tables, the Customers table and the Orders table. Write a SQL query to find all customers w...
OneCoder
一个中年人的自留地,记录学习 C++、GESP/NOI、Java、Python 与算法架构的心得体会。本站唯一网址:coderli.com

