SELECT class.Name , COUNT(student.name),avg(Marks.marks) as average_mark
From class
INNER JOIN student on class.Fields_ID = student.Fields_ID
INNER JOIN marks on marks.Fields_ID = student.Fields_ID
GROUP BY class.Name;
SELECT class.Name , COUNT(student.name),avg(Marks.marks) as average_mark
From class
INNER JOIN student on class.Fields_ID = student.Fields_ID
INNER JOIN marks on marks.Fields_ID = student.Fields_ID
GROUP BY class.Name;