I'm learning SQL Server and have a question between nested Subquery vs Derived table using from clause. Example for nested Subquery where it is using the from clause. Example was taken from the link : https://www.tutorialgateway.org/sql-subquery/
USE [SQL Tutorial]
GO
SELECT subquery.FirstName + ' ' + subquery.LastName AS [Full Name]
,subquery.[Occupation]
,subquery.[YearlyIncome]
,subquery.[Sales]
FROM (
SELECT [Id]
,[FirstName]
,[LastName]
,[Education]
,[Occupation]
,[YearlyIncome]
,[Sales]
FROM [Employee Table]
WHERE [Sales] > 500
) AS [subquery]
Example for Derived table where it is using the from clause. Example was taken from the link : https://www.tutorialgateway.org/sql-derived-table/
USE [SQLTEST]
GO
SELECT *
FROM (
SELECT [EmpID]
,[FirstName]
,[LastName]
,[Education]
,[YearlyIncome]
,[Sales]
,[DeptID]
FROM [EmployeeDetails]
) AS [Derived Employee Details]
WHERE [Sales] > 500
what makes the nested subquery different form the derived table. Thank you for your time.