一、子查询--查询的嵌套(重点记忆)
select bumen,COUNT(*) from haha group by bumen having COUNT(*)>=5
select MAX(age) from haha where bumen='销售部'
select * from haha where bumen='销售部'and age =35
--汇总--
select MAX(age)
from haha
where bumen in (
select bumen
一、子查询--查询的嵌套(重点记忆)
select bumen,COUNT(*) from haha group by bumen having COUNT(*)>=5
select MAX(age) from haha where bumen='销售部'
select * from haha where bumen='销售部'and age =35
--汇总--
select MAX(age)
from haha
where bumen in (
select bumen