当前位置:网站首页>力扣(LeetCode)182. 查找重复的电子邮箱(2022.07.01)
力扣(LeetCode)182. 查找重复的电子邮箱(2022.07.01)
2022-07-02 07:20:00 【ChaoYue_miku】
Create table If Not Exists Person (id int, email varchar(255))
Truncate table Person
insert into Person (id, email) values ('1', '[email protected]')
insert into Person (id, email) values ('2', '[email protected]')
insert into Person (id, email) values ('3', '[email protected]')
编写一个 SQL 查询,查找 Person 表中所有重复的电子邮箱。
示例:
±—±--------+
| Id | Email |
±—±--------+
| 1 | [email protected] |
| 2 | [email protected] |
| 3 | [email protected] |
±—±--------+
根据以上输入,你的查询应返回以下结果:
±--------+
| Email |
±--------+
| [email protected] |
±--------+
说明:所有电子邮箱都是小写字母。
来源:力扣(LeetCode)
链接:https://leetcode.cn/problems/duplicate-emails
方法一:使用GROUP BY和HAVING字句
MySQL提交内容:
# Write your MySQL query statement below
select Email
from Person
group by Email
having count(Email) > 1;
边栏推荐
猜你喜欢

UVM learning - object attribute of UVM phase

4. Random variables

华为游戏初始化init失败,返回错误码907135000

集成学习概览

Beautiful and intelligent, Haval H6 supreme+ makes Yuanxiao travel safer
![2. Hacking lab script off [detailed writeup]](/img/f3/29745761cd5ad4df84c78ac904ea51.png)
2. Hacking lab script off [detailed writeup]

使用sqlcipher打开加密的sqlite方法

Shapiro Wilk normal analysis by SPSS

【TS】1368- 秒懂 TypeScript 泛型工具类型!

从.bag文件中读取并保存.jpg图片和.pcd点云
随机推荐
axis设备的rtsp setup头中的url不能带参
Shell programming 01_ Shell foundation
2022-06-17
[TS] 1368 seconds understand typescript generic tool types!
Session cookies and tokens
UWA报告使用小技巧,你get了吗?(第四弹)
点云投影图片
UVM factory mechanism
转换YV12到RGB565图像转换,附YUV转RGB测试
P1055 [noip2008 popularization group] ISBN number
PCL之滤波
如何使用IDE自动签名调试鸿蒙应用
记录 AttributeError: ‘NoneType‘ object has no attribute ‘nextcall‘
全网显示 IP 归属地,是怎么实现的?
1287_ Implementation analysis of prvtaskistasksuspended() interface in FreeRTOS
STM32 and motor development (upper system)
Kustomize使用手册
【TS】1368- 秒懂 TypeScript 泛型工具类型!
C#中索引器
618再次霸榜的秘密何在?耐克最新财报给出答案