title: Inner join with 3 tables in mysql
body: <p>I want to select data from more tables with Inner join.</p>
  
  <p>These are my tables.</p>
  
  <pre><code>Student (studentId, firstName, lastname)
  Exam (examId, name, date)
  Grade (gradeId, fk_studentId, fk_examId, grade)
  </code></pre>
  
  <p>I want to write a statement that shows which exam, grade and date alle the students have been to. Sorted after date.</p>
  
  <p>This is my statement.  It runs, but i want to make sure that i am doing it correctly.</p>
  
  <pre><code>SELECT
    student.firstname,
    student.lastname,
    exam.name,
    exam.date,
    grade.grade
  FROM grade
    INNER JOIN student
      ON student.studentId = grade.gradeId
    INNER JOIN exam
      ON exam.examId = grade.gradeId
  ORDER BY exam.date
  </code></pre>