Last answered:

18 Nov 2020

Posted on:

16 Nov 2020

0

Resolved: Solution Modification

Hello! In the exercise, we had to display the number of department managers who were hired between the 1st of January 1990 and the 1st of January 1995. According to the solution, the displayed date after execution is the from & to dates. On the contrary shouldn't it be the hire date? Also, I tried the question without using a subquery and got a slightly different result which looked more appropriate according to the question. Waiting for your response. I am just wondering. I may be wrong.  SELECT e.emp_no,e.first_name,e.last_name,e.hire_date,d.dept_no
FROM employees e
JOIN dept_manager d ON e.emp_no=d.emp_no
WHERE e.hire_date BETWEEN '1990-01-01' AND '1995-01-01'
ORDER bY e.emp_no;
1 answers ( 1 marked as helpful)
Instructor
Posted on:

18 Nov 2020

0
Hi Archisman! Thanks for reaching out. This is a great observation indeed!  In fact, what we achieve with the query we suggest is an output as obtained from the dept_managers table for all managers that have been hired in the company for the first time between Jan 1 1990 and Jan 1 1995. We don't display any information from the employees table.  The query you suggest responds to this part of the question. However, it doesn't involve the use of a subquery, which is what the purpose of the exercise is about. Thank you very much for paying attention to this subtlety! I will revise it with my colleagues and will update the task text/suggested solution accordingly. Hope this helps.
Kind regards,
Martin

Submit an answer