当前位置:网站首页>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.
边栏推荐
- Rust 入门指南(modules 和工程结构)
- C language cycle sentence strengthening exercises
- Cell review: single cell methods in human microbiome research
- R language and data analysis practice 11 - data deletion
- redis 主从架构(sizeof函数怎么计算)
- How does app automated testing achieve H5 testing
- 远光软件获得阿里云产品生态集成认证,携手阿里云共建新合作
- 调用整数或字符数组函数里的参数应该传入啥
- navicate修改数据库名的方式
- WPF implements MessageBox message prompt box with mask
猜你喜欢

Cloud computing notes part.1 - system management

认识中小型局域网WLAN

Rust 入门指南(modules 和工程结构)

How does app automated testing achieve H5 testing

How openocd directly downloads programs to STM32 board through stlink (solved)

英文翻译意大利语-批量英文翻译意大利语工具免费

NDK 系列(5):JNI 从入门到实践,爆肝万字详解!

High beam software has obtained Alibaba cloud product ecological integration certification, and is working with Alibaba cloud to build new cooperation

【微信小程序开发】页面导航与传参

克服“看牙恐惧”,我们用技术改变行业
随机推荐
leetcode day3 查找重复的电子邮箱
英文翻译西班牙语-批量英文翻译西班牙工具免费
MySQL8 Encrypting InnoDB Tablespaces
Pagoda panel construction novel CMS management system source code measurement - thinkphp6.0
博途1200/1500PLC上升沿下降沿指令编程应用技巧(bool数组)
Nokia expands its 5g agreement with BT and will become its largest wireless access device supplier
App自动化测试是怎么实现H5测试的
我的第二次博客——C语言
Sword finger offer II 109. unlock the password lock
读了三年论文,我今天才学会阅读摘要
VAE: understanding and implementation of variational self encoder
Force buckle 1331. Array serial number conversion
芯片功耗性能验证:从困境到超越
助力面板行业创新,FPGA将成屏厂TCON最佳选择?
Rust 入门指南(rustup, cargo)
Servlet学习笔记
诺基亚扩大与英国电信的5G协议,将成其最大无线接入设备供应商
这个客制化键盘,秀翻我了~
R language and data analysis practice 11 - data deletion
How openocd directly downloads programs to STM32 board through stlink (solved)