[LeetCode] 182. Duplicate Emails_Easy tag: SQL
Write a SQL query to find all duplicate emails in a table named Person
.
+----+---------+
| Id | Email |
+----+---------+
| 1 | a@b.com |
| 2 | c@d.com |
| 3 | a@b.com |
+----+---------+
For example, your query should return the following for the above table:
+---------+
| Email |
+---------+
| a@b.com |
+---------+
Note: All emails are in lowercase.
Code
SELECT Email from Person GROUP BY Email HAVING count(Email) > 1
[LeetCode] 182. Duplicate Emails_Easy tag: SQL的更多相关文章
- [LeetCode] 196. Delete Duplicate Emails_Easy tag: SQL
Write a SQL query to delete all duplicate email entries in a table named Person, keeping only unique ...
- leetcode 182. Duplicate Emails having的用法 SQL执行顺序
https://leetcode.com/problems/duplicate-emails/description/ 首先sql的执行顺序是 from-->where-->group b ...
- Leetcode 182. Duplicate Emails
Write a SQL query to find all duplicate emails in a table named Person. +----+---------+ | Id | Emai ...
- [LeetCode] 197. Rising Temperature_Easy tag: SQL
Given a Weather table, write a SQL query to find all dates' Ids with higher temperature compared to ...
- [LeetCode] 595. Big Countries_Easy tag: SQL
There is a table World +-----------------+------------+------------+--------------+---------------+ ...
- LeetCode 182. Duplicate Emails (查找重复的电子邮箱)
题目标签: 题目给了我们一个 email 的table,让我们找到重复的 email. 可以建立 Person a, Person b, 找到两个表格中,emai 相等 但是 id 不同的 email ...
- [LeetCode] 610. Triangle Judgement_Easy tag: SQL
A pupil Tim gets homework to identify whether three line segments could possibly form a triangle. Ho ...
- [LeetCode] 607. Sales Person_Easy tag: SQL
Description Given three tables: salesperson, company, orders.Output all the names in the table sales ...
- [LeetCode] 577. Employee Bonus_Easy tag: SQL
Select all employee's name and bonus whose bonus is < 1000. Table:Employee +-------+--------+---- ...
随机推荐
- java框架---->mybatis的使用(一)
这里我们记录一些mybatis的一些常用知识和项目中遇到的问题总结.快乐人生的三个必要元素是,有要做的事.热爱的事及盼望的事. mybatis的一些知识 一.mybatis插入返回主键值 插入的jav ...
- nginx(二)----ubuntu14.04下启动或重启和关闭nginx
/** * lihaibo * 文章内容都是根据自己工作情况实践得出. *如有错误,请指正 *转载请注明出处 */ 一.启动 /usr/local/nginx/sbin/nginx或者cd /usr/ ...
- PostgreSQL索引介绍
h1, h2, h3, h4, h5, h6, p, blockquote { margin: 5px; padding: 5; } body { font-family: "Helveti ...
- python编码问题总结
最近利用python抓取一些网上的数据,遇到了编码的问题.非常头痛,总结一下用到的解决方案. linux中vim下查看文件编码的命令 set fileencoding python中一个强力的编码检测 ...
- SDRAM相位角计算
SDRAM相位角计算 下面是我复制别人的没有图片 如果想看原文 点击下面链接,, http://wenku.baidu.com/view/91e2d76a27284b73f24250e6.html 一 ...
- 【CF884D】Boxes And Balls 哈夫曼树
[CF884D]Boxes And Balls 题意:有n个箱子和若干个球,球的颜色也是1-n,有ai个球颜色为i,一开始所有的球都在1号箱子里,你每次可以进行如下操作: 选择1个箱子,将里面所有的球 ...
- python requests模块中返回时间elapsed解析
一.问题: Python 中requests库在发送http请求时相当方便好用,但在使用时一直受一个问题困扰,怎么才能查看请求时长呢? 自己写时间函数再相减?NO,这个方法肯定不行. 二.解决: 好吧 ...
- Listview多tab上滑悬浮
extends:http://blog.163.com/xueshanhaizi@126/blog/static/37250245201410541721892/ 1:近期要做一个含有两个tab切换页 ...
- Edge Animate初篇教程(二)
Edge Animate 是Adobe最新出品的制作HTML5动画的可视化工具,简单的可以理解为HTML5版本的Flash Pro.在之后的文章中,我会逐一的介绍这款新的HTML5动画神器. 一.创建 ...
- windows 环境下node开发环境搭配问题
当我们使用ccap 生成验证码时,需要node-gyp构建build,但是c的编译环境是在python,vc. node-gyp包 https://github.com/TooTallNate/nod ...