题解 | #各个title类型对应的员工薪水对应的平均工资#

统计出当前各个title类型对应的员工当前薪水对应的平均工资

https://www.nowcoder.com/practice/c8652e9e5a354b879e2a244200f1eaae

# 隐式内连接
select t.title, avg(s.salary) as avg
from titles t, salaries s
where t.emp_no = s.emp_no
group by t.title
order by avg;

# 内连接
select t.title, avg(s.salary) as avg
from titles t inner join salaries s
on t.emp_no = s.emp_no
group by t.title
order by avg;

全部评论

相关推荐

点赞 收藏 评论
分享
牛客网
牛客企业服务