题解 | #查找当前薪水详情以及部门编号dept_no#
查找当前薪水详情以及部门编号dept_no
https://www.nowcoder.com/practice/c63c5b54d86e4c6d880e4834bfd70c3b
select s.emp_no,s.salary,s.from_date,s.to_date,d.dept_no from salaries s left join dept_manager d on s.to_date=d.to_date group by s.emp_no order by s.emp_no asc;
报错
ERROR 1055 (42000): Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'school.s.salary' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by#数据库#