Task: Text to Code
Input (English): Step 1: For each row in jobs table, find the corresponding rows in employees table.
Step 2: find each value of DEPARTMENT_ID in the results of step 1 along with the average MAX_SALARY of the corresponding rows to each value
Output (English): SELECT T1.JOB_TITLE , Avg ( T1.MAX_SALARY ) FROM jobs AS T1 JOIN employees AS T2 ON T1.JOB_ID = T2.JOB_ID GROUP BY T2.DEPARTMENT_ID