Subquery in a From Clause
Subqueries can be used in the From clause in place of table references (table_name).
Example
SELECT * FROM (SELECT * FROM emp WHERE sal > 10000) new_emp, dept WHERE new_emp.deptno = dept.deptno
See also
For more information about subqueries, see
Subqueries.