当前位置:网站首页>Leetcode day3 find duplicate email addresses
Leetcode day3 find duplicate email addresses
2022-07-28 19:44:00 【wyqgg123】
182. Find duplicate email
The difficulty is simple
SQL framework
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 .
Answer key :
By reading the question, we can know that we can use group query , Judge the total
This question is also relatively simple. I'll put it directly sql Code
select Email
from Person
group by Email
having count(Email)>=2
You need to query the data in groups first , adopt Emali grouping , And then it's conditional count(Email) The number of is greater than or equal to 2 Of , In this way, the results of the query are repeated email.
边栏推荐
- MATLAB实现的图像分割之边缘检测和连接
- Cloud computing notes part.1 - system management
- 以数字化转型为契机,3C企业如何通过SRM供应商云协同平台实现高效协同?
- Cell review: single cell methods in human microbiome research
- China's first chip stamp released: built-in 120um ultra-thin NFC chip
- Salt SSH of saltstack
- navicate修改数据库名的方式
- 初步学习函数(第3篇博客)
- shared_ PTR and make_ Use of shared
- Smart contract security - overflow vulnerability
猜你喜欢

微信公众号授权登录后报redirect_uri参数错误的问题

source insight项目导入和使用教程

Pytoch: implementation of crossentropyloss and labelsmoothing

远光软件获得阿里云产品生态集成认证,携手阿里云共建新合作

How does app automated testing achieve H5 testing

Quickly install torch spark, torch geometric and other packages in moment pool cloud

What parameters should be passed in calling integer or character array functions

CodeIgnier框架实现restful API接口编程

业务可视化-让你的流程图“Run“起来(4.实际业务场景测试)

Servlet学习笔记
随机推荐
【笔记】《结网:互联网产品经理改变世界》
初步学习函数(第3篇博客)
[网络]跨区域网络的通信学习IPv4地址的分类和计算
Saltstack configuration management
Taking the opportunity of digital transformation, how can 3C enterprises achieve efficient collaboration through SRM supplier cloud collaboration platform?
Thoroughly understand bit operations - shift left, shift right
NDK 系列(5):JNI 从入门到实践,爆肝万字详解!
npm安装和卸载全局包
基于C语言的信息管理系统和小游戏
MATLAB实现的图像分割之边缘检测和连接
Android section 13 03xutils detailed explanation of database framework (addition, deletion and modification)
Search problems and technologies
Servlet learning notes
SaltStack常用的模块
R language and data analysis practice 11 - data deletion
Rust 入门指南(crate 管理)
MySQL性能测试工具sysbench学习
基于QTGUI图像界面的空战游戏设计
Nokia expands its 5g agreement with BT and will become its largest wireless access device supplier
Cell综述:人类微生物组研究中的单细胞方法