Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You assume that all people have bosses. The top boss has no boss. You also assume that all department names are unique.

Nitpicking, yes, but these questions certainly allow for a deeper discussion with the interviewer.



You assume that all people have bosses. The top boss has no boss.

Isn't that why a left outer join is used?

Besides, if you are referring to question #1, a person without a boss can never be a part of the set of employees who have a higher salary than their boss.


Two assumptions to be clarified in the interview: 4th question above doesn't apply to the top boss (who can't have a greater salary than a boss he/she doesn't have, so no issue on the 1st question). Department table has an alternate key on department name.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: