Database: network_1
Question: Find the average grade of all students who have some friends.
SQL: 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)