計算日期之間的天數
在這個練習中,你要計算訂單日期與出貨日期之間的差異。
本練習屬於課程
SQL Server 中級
練習說明
撰寫一個查詢,回傳 OrderDate 與 ShipDate 之間的天數。
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
-- Return the difference in OrderDate and ShipDate
SELECT OrderDate, ShipDate,
___(___, OrderDate, ShipDate) AS Duration
FROM Shipments