Mysql
 sql >> Database >  >> RDS >> Mysql

come recuperare i dati da tre o più tabelle?

  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;