Mysql
 sql >> Datenbank >  >> RDS >> Mysql

Wie rufe ich Daten aus drei oder mehr Tabellen ab?

  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;