SQL Self Join
Hello,
In the SQL SELF JOIN video in the SQL course, there is an exercise to use the emp_manager table to extract the record data for only the employees who are also managers.
Two solutions are given for to obtain the two row output we are looking for
- use SELECT DISTINCT at the beginning of the query
- use a WHERE statement in the query to connect back to the manager_no column in the emp_manager table
1 answers ( 0 marked as helpful)
Hi Simon!
Thanks for reaching out.
We are aiming to provide exercises on using self joins, which is the topic of the section and lecture. That's the main reason.
Otherwise, as it can happen in many other occasions, there may be several solutions to a given problem in SQL.
Hope this helps but please feel free to get back to us should you need further assistance. Thank you.
Best,
Martin
Martin