182. Duplicate Emails
Write a SQL query to find all duplicate emails in a table named Person
.
+----+---------+
| Id | Email |
+----+---------+
| 1 | a@b.com |
| 2 | c@d.com |
| 3 | a@b.com |
+----+---------+
For example, your query should return the following for the above table:
+---------+
| Email |
+---------+
| a@b.com |
+---------+
Note: All emails are in lowercase.
在一个名为Person的表中查找所有重复的电子邮件。
MySQL(1156ms):
# Write your MySQL query statement below
SELECT Email
FROM Person
GROUP BY Email
HAVING COUNT(*) > 1 ;
182. Duplicate Emails的更多相关文章
- Leetcode 182. Duplicate Emails
Write a SQL query to find all duplicate emails in a table named Person. +----+---------+ | Id | Emai ...
- 【SQL】182. Duplicate Emails
Write a SQL query to find all duplicate emails in a table named Person. +----+---------+ | Id | Emai ...
- leetcode 182. Duplicate Emails having的用法 SQL执行顺序
https://leetcode.com/problems/duplicate-emails/description/ 首先sql的执行顺序是 from-->where-->group b ...
- LeetCode 182. Duplicate Emails (查找重复的电子邮箱)
题目标签: 题目给了我们一个 email 的table,让我们找到重复的 email. 可以建立 Person a, Person b, 找到两个表格中,emai 相等 但是 id 不同的 email ...
- [LeetCode] Delete Duplicate Emails 删除重复邮箱
Write a SQL query to delete all duplicate email entries in a table named Person, keeping only unique ...
- [LeetCode] Duplicate Emails 重复的邮箱
Write a SQL query to find all duplicate emails in a table named Person. +----+---------+ | Id | Emai ...
- LeeCode(Database)-Duplicate Emails
Write a SQL query to find all duplicate emails in a table named Person. +----+---------+ | Id | Emai ...
- [SQL]LeetCode182. 查找重复的电子邮箱 | Duplicate Emails
Write a SQL query to find all duplicate emails in a table named Person. +----+---------+ | Id | Emai ...
- LeetCode DB: Duplicate Emails
Write a SQL query to find all duplicate emails in a table named Person. +----+---------+ | Id | Emai ...
随机推荐
- ACE自适配通信环境简介
转载于:http://www.cnblogs.com/TianFang/archive/2006/12/03/580795.html ACE自适配通信环境 (Adaptive Communicatio ...
- bzoj 2124 等差子序列 树状数组维护hash+回文串
等差子序列 Time Limit: 3 Sec Memory Limit: 259 MBSubmit: 1919 Solved: 713[Submit][Status][Discuss] Desc ...
- jq 由name获取那个radio选中了的
$("input[name='approve']:checked").val() //获取radio选中的值;var radio_checked_val = $("#fo ...
- sql获取当前时间
sql读取系统日期和时间的方法如下:--获取当前日期(如:yyyymmdd) select CONVERT (nvarchar(12),GETDATE(),112) --获取当前日期(如:yyyymm ...
- MSSQL Get Last Monday and Last Sunday
获取上周的周一和周日 代码: --start of last week , ) --end of last week , )
- .NET RabbitMQ
在企业应用系统领域,会面对不同系统之间的通信.集成与整合,尤其当面临异构系统时,这 种分布式的调用与通信变得越发重要.其次,系统中一般会有很多对实时性要求不高的但是执行起来比较较耗时的地方,比如发送短 ...
- [cerc2012][Gym100624B]20181013
- 【poj2114】点分治(离线)
boatherds 2s 64M by czy 求一颗树上距离为K的点对是否存在 输入数据 n,m 接下来n-1条边a,b,c描述a到b有一条长度为c的路径 接下来m行每行询问一个K 输出数据 对于每 ...
- 【Foreign】K优解 [堆]
K优解 Time Limit: 20 Sec Memory Limit: 512 MB Description 给定n个行数,每行m个.在每行中选出一个数来,求出前 k 小的异或和. Input 第 ...
- 【BZOJ4903】【CTSC2017】吉夫特 [DP]
吉夫特 Time Limit: 15 Sec Memory Limit: 512 MB[Submit][Status][Discuss] Description Input 第一行一个整数n. 接下 ...