当前位置:网站首页>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;
边栏推荐
- P1055 [noip2008 popularization group] ISBN number
- Special topic of binary tree -- acwing 1589 Building binary search tree
- Kustomize使用手册
- 学习open62541 --- [66] UA_String的生成方法
- UVM learning - object attribute of UVM phase
- Hdu1236 ranking (structure Sorting)
- 二叉树专题--AcWing 18. 重建二叉树(利用前、中序遍历,构建二叉树)
- Oracle 笔记
- 【AGC】构建服务3-认证服务示例
- JSP webshell免殺——JSP的基礎
猜你喜欢

14. Code implementation of semaphore

Disassembling Meitu SaaS: driving the plane to change the engine

二叉树专题--洛谷 P1229 遍历问题(乘法原理 已知前、后序遍历求中序遍历个数)

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

How to get the password of cpolar?
![[visual studio] visual studio 2019 community version cmake development environment installation (download | install relevant components | create compilation execution project | error handling)](/img/9f/4265f1e3927fcf66602f0fc9e7a9d9.jpg)
[visual studio] visual studio 2019 community version cmake development environment installation (download | install relevant components | create compilation execution project | error handling)

MySQL environment configuration

【快应用】text组件里的文字很多,旁边的div样式会被拉伸如何解决

Open the encrypted SQLite method with sqlcipher

【AGC】构建服务3-认证服务示例
随机推荐
HDU1236 排名(结构体排序)
UVM - usage of common TLM port
Oracle 笔记
二叉树专题--AcWing 1497. 树的遍历(利用后、中序遍历,构建二叉树)
【快应用】text组件里的文字很多,旁边的div样式会被拉伸如何解决
大华设备播放过程中设置播放速度
MySQL数据库远程访问权限设置
首份中国企业敏捷实践白皮书发布| 附完整下载
From Read and save in bag file Jpg pictures and PCD point cloud
618 what is the secret of dominating the list again? Nike's latest financial report gives the answer
PCL extracts a subset from a point cloud
PCL eigen introduction and simple use
Special topic of binary tree -- acwing 1589 Building binary search tree
Shapiro Wilk normal analysis by SPSS
HDU1234 开门人和关门人(水题)
PCL projection point cloud
Oracle notes
MongoDB 学习整理(条件操作符,$type 操作符,limit()方法,skip() 方法 和 sort() 方法)
全网显示 IP 归属地,是怎么实现的?
12. Process synchronization and semaphore