Last answered:

08 Mar 2023

Posted on:

15 Feb 2022

0

Why does drawing data from dept_manager_dup table get different results?

Hi! I am a bit confused here. I first wrote my query as in the picture and it yielded 22 rows instead of the answer of this assignment which yields 24 rows as output. Can you please explain why I have to select from "employees" table instead of "dept_manager_dup"? Thank you.

image.png

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

18 Mar 2022

0

Hi Pawee!
Thanks for reaching out.

It is possible that you have deleted some of the rows. Actually, we use both of the tables employees and dept_manager_dup. The order of the tables matters in LEFT/RIGHT JOINs but the order does not matter in the JOIN(=INNER JOIN).

Hope this helps.
Best,
Tsvetelin

Posted on:

02 Aug 2022

3

Hi Pawee Chiranothai

The query given in the answers uses dept_manager table and your query uses dept_manager_dup , which has 2 rows less than dept_manager table.

Hope 365datascience.com team can correct it to avoid confusion.

Posted on:

08 Mar 2023

0

Thank you Basil Baby! 

Submit an answer