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 ;
1 answers ( 1 marked as helpful)
Posted to make note of this to refer back to it for future and hopefully save anyone else the same frustrations I had.