题目:统计出当前各个title类型对应的员工当前薪水对应的平均工资
代码:
SELECT t.title, avg(s.salary)
FROM titles AS t
INNER JOIN salaries AS s
ON t.emp_no = s.emp_no
GROUP BY t.title
ORDER BY avg(s.salary) ASC
题目:统计出当前各个title类型对应的员工当前薪水对应的平均工资
代码:
SELECT t.title, avg(s.salary)
FROM titles AS t
INNER JOIN salaries AS s
ON t.emp_no = s.emp_no
GROUP BY t.title
ORDER BY avg(s.salary) ASC