SQL 7) - GROUP BY & HAVING 查找薪水变动超过15次的员工号及其对应的变动次数
查找薪水变动超过15次的员工号emp_no以及其对应的变动次数t
http://www.nowcoder.com/questionTerminal/6d4a4cff1d58495182f536c548fee1ae
方法)使用GROUP BY子句及聚合函数COUNT得出薪水变动次数大于15的员工
SELECT emp_no, COUNT(emp_no) AS t FROM salaries GROUP BY emp_no HAVING t > 15; -- 组筛选条件