Here is the relational schema given :
employee (person-name , street, city) works (person-name, company-name, salary) company (company-name, city) manages (person-name, manager-name)
Q: Find the names of all employees who live in the same city and on the same street as do their managers.
I find the solution somewhere :
but solution seems wrong which is just after second natural-join sign there is no select statement sign and just after that sign, a predicate appears 0_o , in that, from where does that
manager-name attribute comes from?. I am completely lost.
My solution seems to be long since I used the Cartesian-product , and the query is bit long (of which I'm not even sure it's right or wrong) :(