Task: Text to Code
Input (English): Step 1: For each row in Movie table, find the corresponding rows in Rating table.
Step 2: find each value of director in the results of step 1 along with the average stars of the corresponding rows to each value
Output (English): SELECT T1.title , Avg ( T2.stars ) FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID GROUP BY T1.director