Last answered:

04 Jul 2022

Posted on:

02 Jul 2022

0

Getting a different result set than the lecture's

Hi

I ran the second query suggested in the lecture (the one with IN), and I got 8 rows, the two main results have repeated. Could anyone help me see what is wrong here?

SELECT
    e1.*
FROM
    emp_manager e1
        JOIN
    emp_manager e2 ON e1.emp_no = e2.manager_no
WHERE
    e2.emp_no IN (SELECT
            manager_no
        FROM
            emp_manager);

image.png

1 answers ( 0 marked as helpful)
Instructor
Posted on:

04 Jul 2022

0

Hi Saeed!
Thanks for reaching out.

Please, check your table records. It may contain duplicates.

Hope this helps.
Best,
Tsvetelin

Submit an answer