Hi,
The below example uses a derived table (a SELECT statement after the FROM clause) to return the CustomerKey and LastName columns of all customers in the DimCustomer table with BirthDate values later than January 1, 1970 and the last name ‘Smith’.
SQL
-- Use AdventureWorks
SELECT CustomerKey, LastName
FROM
(SELECT * FROM DimCustomer
WHERE BirthDate > '01/01/1970') AS DimCustomerDerivedTable
WHERE LastName = 'Smith'
ORDER BY LastName;
For more information refer below link
https://msdn.microsoft.com/en-us/library/ms177634.aspx
refer below link to get Diff between Temporary table vs Table variable vs derived Table.
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/6698069d-7d1f-42e4-9136-7247842d3481/temporary-table-vs-table-variable-vs-derived-table?forum=transactsql
I hope this will help you out.