sql join on two tables code example
Example 1: join multiple tables in sql
SELECT Books_Namn, Author_Namn, Author_Age, Store_Namn FROM books
JOIN Author ON Author_Id = Author_Author_Id
JOIN Books_has_Store ON Books_Books_Id = Books_Id
JOIN Store ON Store_Id = Store_Store_Id;
Example 2: sql join two queries
SELECT t1.Activity, t1."Total Amount 2009", t2."Total Amount 2008"
FROM (query1) as t1, (query2) as t2
WHERE t1.Activity = t2.Activity