mysql学习打卡day25

今日成果:

复制代码
select * 
from clients
where client_id in (
select client_id
from invoices
group by client_id
having count(*) >=2
);
-- 另一种写法
select * 
from clients
where client_id = any (
select client_id
from invoices
group by client_id
having count(*) >=2
);
-- 查询大于2张发票的用户

感谢各位读者查阅,欢迎各位👍点赞✍评论⭐收藏+关注!

相关推荐
春风解人意2 小时前
从零开始学习嵌入式P32----网络基础之TCP
c语言·网络·学习·tcp/ip
SkyWalking中文站3 小时前
BanyanDB 0.11.0:新特性与升级指南
数据库
传奇开心果编程4 小时前
【Rust入门知识点学与练】第21课:Trait 进阶 Advanced Traits
开发语言·学习·rust
水巷石子4 小时前
备考系统架构设计师第一天
学习·架构·软考·设计·考试
₍˄·͈༝·͈˄*₎◞ ̑̑码4 小时前
MyBatis操作数据库
数据库·mybatis
是隼人5 小时前
buuctf-pwn inndy_echo(32位fmt)题解(学习过程持续更新)
c语言·学习·安全·pwn入门·ctf入门
xian_wwq6 小时前
【学习笔记】深度认知系列-第16讲-提示词工程
人工智能·笔记·学习
洛阳纸贵6 小时前
MATLAB-matlab基础知识
学习·算法·matlab
Vcaker6 小时前
Linux学习25-harbor私有仓库部署
linux·运维·学习
刃神太酷啦6 小时前
Redis 进阶核心:持久化 (RDB/AOF)、事务与主从复制全解析----《Hello Redis!》(5)
linux·c语言·数据库·c++·redis·缓存·bootstrap