mysql join with subquery code example
Example 1: mysql join query
SELECT
m.member_id,
m.name member,
c.committee_id,
c.name committee
FROM
members m
INNER JOIN committees c
ON c.name = m.name;
Example 2: sql join on a subquery
SELECT *
FROM
( SELECT ... FROM ... ) q1
INNER JOIN
( SELECT ... FROM ... ) q2
ON q1.colname = q2.colname