Last answered:

04 May 2024

Posted on:

22 May 2023

0

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 ;
3 answers ( 1 marked as helpful)
Posted on:

22 May 2023

0

Posted to make note of this to refer back to it for future and hopefully save anyone else the same frustrations I had.

Posted on:

14 Nov 2023

0

still not working for me !


Instructor
Posted on:

04 May 2024

0

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

Submit an answer