Task: Text to Code
Input (English): Step 1: For each row in Campuses table, find corresponding rows in csu_fees table and in discipline_enrollments table.
Step 2: find the average Undergraduate of each value of csu_fees's Year in the results of step 1.
Step 3: find discipline_enrollments's Year of the results of step 1 with largest value in the results of step 2
Output (English): SELECT T3.Year FROM Campuses AS T1 JOIN csu_fees AS T2 ON T2.Campus = T1.Id JOIN discipline_enrollments AS T3 ON T1.Id = T3.Campus GROUP BY T2.Year ORDER BY Avg ( T3.Undergraduate ) Desc LIMIT 1