查询出Bruce的月薪,得到数据是6000
select e.salary from hr.employees e where e.first_name= 'Bruce' 统计月薪高于6000的人数 select count(*) from hr.employees e where e.salary > 6000.00 这需要两句sql语句 通过子查询,一句sql语句就足够了 select count(*) from hr.employees e where e.salary > ( select e.salary from hr.employees e where e.first_name= 'Bruce' ) 小括号里的sql即为子查询
HOW2J公众号,关注后实时获知最新的教程和优惠活动,谢谢。
![]()
提问已经提交成功,正在审核。 请于 我的提问 处查看提问记录,谢谢
|