project_and_employee
that joins the Project
and Employee
tables on the employee_id
column.project_id
, employee_id
, and experience_years
.project_id
and the maximum experience_years
for each project, and alias it as max_experience
.project_id
and employee_id
from the CTE.project_id
and where the experience_years
in the CTE equals the max_experience
from the subquery.erDiagram Project ||--o{ Employee : works_on Project { int project_id int employee_id } Employee { int employee_id varchar name int experience_years }