Task: Text to Code
Input (English): SQL: SELECT Avg ( grade ) FROM Highschooler
Feedback: Every pupils must have friends.
Output (English): SELECT avg(grade) FROM Highschooler WHERE id IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id)