A derived table is a query embedded within another query in place of an input table in the FROM clause. Derived tables may be nested for even more complex queries. They can easily be requested with the following simple steps:
- Build a separate Variable Creation analysis for the “derived” table.
- Set the Output - storage option to Generate the SQL for this analysis but do not execute it in the “derived” table analysis.
Select or “reference” the desired columns produced by the “derived” table analysis.
The SQL generated by the “derived” table analysis will be embedded in the FROM clause of the containing analysis as a derived table!