Last answered:

13 May 2023

Posted on:

13 Feb 2023

0

Assignment (Excercise #1)

I am sorry but I did not get what is meant by 'disregard the department the managers have worked in'

I firstly got that we are required to get the last department each manager is working in so my solution was 

SELECT 
   emp_no, dept_no, max(from_date),
   row_number() over (order by emp_no) as row_num
FROM
    dept_manager
GROUP BY dept_no;

while the excercise solution is not like that 

2 answers ( 0 marked as helpful)
Posted on:

13 May 2023

0

select emp_no,dept_no,
row_number() over(order by emp_no asc) as row_num
from dept_manager
;

Posted on:

13 May 2023

0

Submit an answer