CodePudding user response:
SELECT SalesOrderID,DATEDIFF (dd, ShipDate, GETDATE ()) AS DaysSinceShipped
The FROM AdventureWorks. Sales. SalesOrderHeader
WHERE ShipDate IS NOT NULL
DaysSinceShipped is computed columns
CodePudding user response:
SELECT SalesOrderID,DATEDIFF (dd, ShipDate, GETDATE ()) AS DaysSinceShipped
The FROM AdventureWorks. Sales. SalesOrderHeader
WHERE ShipDate IS NOT NULL