当前位置:网站首页>Leetcode 182 Find duplicate email (2022.07.01)
Leetcode 182 Find duplicate email (2022.07.01)
2022-07-02 10:59: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]')
Write a SQL Inquire about , lookup Person All duplicate email addresses in the table .
Example :
±—±--------+
| Id | Email |
±—±--------+
| 1 | [email protected] |
| 2 | [email protected] |
| 3 | [email protected] |
±—±--------+
According to the above input , Your query should return the following results :
±--------+
| Email |
±--------+
| [email protected] |
±--------+
explain : All e-mails are in lowercase letters .
source : Power button (LeetCode)
link :https://leetcode.cn/problems/duplicate-emails
Method 1 : Use GROUP BY and HAVING Words and expressions
MySQL Submission :
# Write your MySQL query statement below
select Email
from Person
group by Email
having count(Email) > 1;
边栏推荐
- 二叉树专题--AcWing 3384. 二叉树遍历(已知先序遍历 边建树 边输出中序遍历)
- [visual studio] visual studio 2019 community version cmake development environment installation (download | install relevant components | create compilation execution project | error handling)
- JSP webshell free -- the basis of JSP
- 6种单例模式的实现方式
- Jsp webshell Free from killing - The Foundation of JSP
- [TS] 1368 seconds understand typescript generic tool types!
- 首份中国企业敏捷实践白皮书发布| 附完整下载
- Filtering of PCL
- PCL之K-d树与八叉树
- 实验电镜距离测量之Matlab处理
猜你喜欢

14. Code implementation of semaphore
![二叉树专题--洛谷 P3884 [JLOI2009]二叉树问题(dfs求二叉树深度 bfs求二叉树宽度 dijkstra求最短路)](/img/c2/bb85b681af0f78b380b1d179c7ea49.png)
二叉树专题--洛谷 P3884 [JLOI2009]二叉树问题(dfs求二叉树深度 bfs求二叉树宽度 dijkstra求最短路)

Overview of integrated learning

MySQL数据库远程访问权限设置

快应用中实现自定义抽屉组件

(五)APA场景搭建之挡位控制设置

二叉树专题--AcWing 47. 二叉树中和为某一值的路径(前序遍历)

《实习报告》Skywalking分布式链路追踪?

HDU1236 排名(结构体排序)

Special topic of binary tree -- acwing 19 The next node of the binary tree (find the successor of the node in the tree)
随机推荐
From Read and save in bag file Jpg pictures and PCD point cloud
Learn open62541 -- [66] UA_ Generation method of string
长投学堂上面的账户安全吗?
面对不确定性,供应链的作用
UVM learning - object attribute of UVM phase
【TS】1368- 秒懂 TypeScript 泛型工具类型!
实验电镜距离测量之Matlab处理
华为快应用中如何实现同时传递事件对象和自定义参数
PCL point cloud to depth image
JSP webshell免杀——webshell免杀
Beautiful and intelligent, Haval H6 supreme+ makes Yuanxiao travel safer
PCL extracts a subset from a point cloud
PCL之K-d树与八叉树
Hdu1236 ranking (structure Sorting)
JSP webshell免殺——JSP的基礎
集成学习概览
Use of vscode tool
计算序列之和
HDU1234 开门人和关门人(水题)
[SUCTF2018]followme