当前位置:网站首页>SQL练习 2022/6/30
SQL练习 2022/6/30
2022-08-04 05:28:00 【Provence°_博】
SQL练习 2022/6/30
182. 查找重复的电子邮箱
题干
代码思路
- group by 然后having判断数量大于一就可
select Email
from Person
group by email
having count(id)>1
- 使用 GROUP BY 和临时表
select Email from
(
select Email, count(Email) as num
from Person
group by Email
) as statistic
where num > 1;
183. 从不订购的客户
题干
代码思路
- 嵌套查询
select name as Customers
from Customers
where id not in
(
select CustomerId
from Orders
)
- 左连接,然后判断为null
select name as Customers
from Customers left join Orders
on Customers.id= Orders.CustomerId
where CustomerID is null
边栏推荐
- 乱码解决方案
- flink-sql所有数据类型
- ISCC2021———MISC部分复现(练武)
- 自动化运维工具Ansible(5)流程控制
- 纳米级完全删除MYSQL5.7以及一些吐槽
- webrtc中的引用计框架
- Deploy LVS-DR cluster [experimental]
- 【Matlab仿真】:一带电量为q的电荷以速度v运动,求运动电荷产生磁感应强度
- 进入古诗文网站个人中心,绕过登录
- The cost of automated testing is high and the effect is poor, so what is the significance of automated testing?
猜你喜欢
随机推荐
flink-sql所有数据类型
CAS与自旋锁、ABA问题
Shell(1)简介入门
[NSSRound#1 Basic]
判断字符串是否有子字符串重复出现
Vulnhub:Sar-1
8.30难题留坑:计数器问题和素数等差数列问题
程序员也应了解的Unity粒子系统
SQL练习 2022/7/1
浏览器中的同源策略
记一次flink程序优化
Set集合与Map集合
LCP 17. Quick Calculation Robot
[原创]STL容器map和unordered_map性能,创建,插入,随机访问速度对比!
编程Go:学习目录
thymeleaf中onclick事件动态传递参数问题
强制结束进程
Linux环境下redis的下载、安装和启动(建议收藏)
MediaCodec支持的类型
php实现telnet访问端口









