sql >> Base de Datos >  >> RDS >> Mysql

¿Cómo obtener datos de tres o más tablas?

  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;