Check out example codes for "sql join 3 tables". It will help you in understanding the concepts better.

Code Example 1

SELECT column-names
  FROM table-name1 JOIN table-name2 
    ON column-name1 = column-name2
 WHERE condition

Code Example 2

SELECT s.studentname
    , s.studentid
    , s.studentdesc
    , h.hallname
FROM students s
INNER JOIN hallprefs hp
    on s.studentid = hp.studentid
INNER JOIN halls h
    on hp.hallid = h.hallid

Learn ReactJs, React Native from akashmittal.com