sql inner join subquery code example
Example 1: sql inner join
SELECT column_name(s)
FROM table1
INNER JOIN table2
ON table1.column_name = table2.column_name;
Example 2: sql join on a subquery
SELECT *
FROM
( SELECT ... FROM ... ) q1
INNER JOIN
( SELECT ... FROM ... ) q2
ON q1.colname = q2.colname