Resolved: Video syntax is outdated/incomplete. Need to run set @@global.sql_mode... & restart application
Video syntax is outdated/incomplete. Need to run
set @@global.sql_mode := replace(@@global.sql_mode, 'ONLY_FULL_GROUP_BY', '');
then restart application
DELIMITER $$
USE employees $$
DROP PROCEDURE IF EXISTS emp_avg_salary $$
CREATE PROCEDURE emp_avg_salary(IN p_emp_no INTEGER)
BEGIN
SELECT e.first_name, e.last_name, AVG(s.salary)
FROM employees e
JOIN salaries s ON e.emp_no = s.emp_no
WHERE e.emp_no = p_emp_no;
END$$
DELIMITER ;
Posted to make note of this to refer back to it for future and hopefully save anyone else the same frustrations I had.
still not working for me !
Hi David and Delih!
Thanks for reaching out.
@David: Thanks for sharing!
@Delih: Can you please share more details on why you are not able to continue? Perhaps in another thread, by sharing screenshots displaying the issue?
In the meantime, can you please check that you have rebooted Workbench after executing the code suggested by David?
In any case, please feel free to refer to the note provided in the resources section of the following lecture: https://learn.365datascience.com/courses/sql/join-and-where-used-together/#assignment
Hope this helps.
Kind regards,
Martin