Suppose you have three tables Students, Marks, and Details tables:
We join Students table and Marks table on s_id columns of both tables and join the result-table with where school_id of Details table and school_id of Marks table matches. Here is the query to join these Students, Marks, and Details tables.
SELECT s_name, score, status, address_city, email_id
FROM Student S
INNER JOIN Marks M
ON S.s_id = M.s_id
INNER JOIN Details D on
D.school_id = M.school_id;
You can take up the best SQL courses by Intellipaat to learn writing complex SQL queries.