alternative code
Is this a valid solution?
CREATE OR REPLACE VIEW v_dm_salary AS
SELECT
ROUND(AVG(salary), 2) AS ave_salary
FROM
salaries s
WHERE
EXISTS( SELECT
dm.emp_no
FROM
dept_manager dm
WHERE
s.emp_no = dm.emp_no);
SELECT
*
FROM
v_dm_salary;
1 answers ( 0 marked as helpful)
Hi Jake!
Thanks for reaching out.
Yes, this is also a valid solution. Bravo!
Hope this helps.
Best,
Tsvetelin