Hello Martin and Team,
So far everything was going on well with the lecture course until I got stuck on this query on the topic of Duplicate Records.
The error comes when I execute the query after I added the GROUP BY clause from the previous lectures, Sir Martin started that the GROUP BY clause is normally
used with an Aggregated Function but the query from the example doesn't seem to have the aggregated function nor where clause. Can I get assistance why my query is resulting in an error I followed that exam the same steps as Sir Martin in the lecture course.
SELECT m.dept_no, m.emp_no, d.dept_name
ON m.dept_no = d.dept_no
GROUP BY m.emp_no
ORDER BY dept_no;
1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'employees.m.dept_no' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by