sql join on a subquery
snippet in sql

sql join on a subquery

user8750

SELECT * 
FROM
( SELECT ... FROM ... ) q1

INNER JOIN

( SELECT ... FROM ... ) q2

ON q1.colname = q2.colname