Extra Questions for Exam #1

Please use the following schema as the basis for these questions:

employee (person_name, street, city)
works (person_name, company_name, salary)
company (company_name, city)
manages (person_name, manager_name)

Give an exprtession in relational algebra to express each of the following queries:

  1. Find the names of all employees who earn more than their managers

  2. Find the names of all employees who live in the same city and on the same street as their managers

  3. Find the names of all employees within the database that do not work for "BNY Mellon"

  4. Find the names of all employees in the database who earn more than the top earner at "BNY Mellon" in the database.




Credits: Borrowed from a famous textbook. Thanks, ya'll!