ABC is an organization operating in a certain country. Below are the data for the database that manages the information on this organization's employees:
employee(employee_name, street, city)
works(employee_name, department_name, position, salary)
department(department_name, city)
manages(employee_name, manager_name).
I have 10 different select queries about this database, and I've solved 8 of them, but am stuck on solving 2.
The first query is 'Select the names of the employees that live in the same street and city as their managers'.
The second query is 'select the department with the highest average salary'.
Any help is appreciated, if any more details are necessary, please tell me.