Join or Subquery?
CREATE OR REPLACE VIEW v_manager_avg_salary AS
SELECT
ROUND(AVG(s.salary), 2) AS average_salary
FROM
salaries s
WHERE
emp_no IN (SELECT
dm.emp_no
FROM
dept_manager dm);
1 answers ( 0 marked as helpful)
Hi Sandra!
Thanks for reaching out.
Can you please tell us if you had a question on the query you posted or is there anything you simply wanted to share? Thank you.
Looking forward to your answer.
Best,
Martin