Calculate the answer of the following question
Question- Given a table employee (name, salary, department), write an SQL expression for each of these two queries:
Part 1- Find the average salary of the employees that earn more than 40K, for each department.
Part 2- Find the average salary of the employees for each department whose employees' average salary is more than 40K
I want assist to determine the average salary of the employees.