sql query average group by with join code example Example: sql avg group by SELECT student_name, avg(notes) FROM student_notes GROUP BY student_name;