The 365 Data Science team is proud to invite you to our own community forum. A very well built system to support your queries, questions and give the chance to show your knowledge and help others in their path of becoming Data Science specialists.
Ask
Anybody can ask a question
Answer
Anybody can answer
Vote
The best answers are voted up and moderated by our team

Still get an error message in Duplicate Records lesson

Still get an error message in Duplicate Records lesson

Super Learner
0
Votes
1
Answer

Hi there,
I am rewatching the lesson on Duplicate Records in JOINs and I executed that code in an earlier lecture to prevent the error message but I am still getting the 1055 error message after this:
SELECT
m.dept_no, m.emp_no, d.dept_name
FROM
dept_manager_dup m
JOIN
departments_dup d ON m.dept_no = d.dept_no
GROUP BY m.emp_no
ORDER BY dept_no;
I am using MacOS 10.15.4 and and Workbench 8.0.19
Let me know how I can solve this?
Thanks.

1 Answer

365 Team

Hi Yunfeng!
Thanks for reaching out.
Please make sure to reconnect to the server after you execute the relevant SET Statement. Then, the code is indeed correct. 
To sum up, here’s the order in which you need to execute the relevant operations, the second one being pressing the icon that has been underlined in red on the picture below.

SET @@global.sql_mode := replace(@@global.sql_mode, 'ONLY_FULL_GROUP_BY', '');

SELECT 
m.dept_no, m.emp_no, d.dept_name
FROM
dept_manager_dup m
JOIN
departments_dup d ON m.dept_no = d.dept_no
GROUP BY m.emp_no
ORDER BY dept_no;

Hope this helps.
Best,
Martin

×
LAST CHANCE
Ready to Learn Data Science?
50% OFF