当前位置:网站首页>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;
边栏推荐
- 6种单例模式的实现方式
- Binary tree topic -- Luogu p3884 [jloi2009] binary tree problem (DFS for binary tree depth BFS for binary tree width Dijkstra for shortest path)
- Special topic of binary tree -- acwing 1589 Building binary search tree
- Kustomize user manual
- Is the account above changtou school safe?
- MySQL lethal serial question 4 -- are you familiar with MySQL logs?
- Kustomize使用手册
- 一招快速实现自定义快应用titlebar
- V2X-Sim数据集(上海交大&纽约大学)
- PCL eigen introduction and simple use
猜你喜欢
2. Hacking lab script off [detailed writeup]
从.bag文件中读取并保存.jpg图片和.pcd点云
Hdu1228 a + B (map mapping)
Special topic of binary tree -- acwing 18 Rebuild the binary tree (construct the binary tree by traversing the front and middle order)
二叉树专题--AcWing 3540. 二叉搜索树建树(实用板子 构建二叉搜索树 并输出前、中、后序遍历)
首份中国企业敏捷实践白皮书发布| 附完整下载
Easyexcel, a concise, fast and memory saving excel processing tool
[SUCTF2018]followme
Binary tree topic -- Luogu p3884 [jloi2009] binary tree problem (DFS for binary tree depth BFS for binary tree width Dijkstra for shortest path)
Matlab processing of distance measurement of experimental electron microscope
随机推荐
Overview of integrated learning
Retrofit's callback hell is really vulnerable in kotlin synergy mode!
[SUCTF2018]followme
QT学习日记8——资源文件添加
Session cookies and tokens
Common methods of JS array
Special topic of binary tree -- acwing 3540 Binary search tree building (use the board to build a binary search tree and output the pre -, middle -, and post sequence traversal)
PCL Eigen介绍及简单使用
Leetcode+ 76 - 80 storm search topic
Disassembling Meitu SaaS: driving the plane to change the engine
OpenMLDB Meetup No.4 会议纪要
Jsp webshell Free from killing - The Foundation of JSP
Filtering of PCL
(5) Gear control setting of APA scene construction
转换YV12到RGB565图像转换,附YUV转RGB测试
Kustomize user manual
P1055 [noip2008 popularization group] ISBN number
618再次霸榜的秘密何在?耐克最新财报给出答案
Nodejs+express+mysql simple blog building
From Read and save in bag file Jpg pictures and PCD point cloud