-3
列出該具有最長的運輸延遲列表對於具有最長的運輸延遲
我嘗試以下,但不能顯示的順序發貨城市和國家的順序發貨城市和國家:
TRENTON NJ 4
作爲需要由查詢返回的唯一結果。
select shipcity, shipstate, shipdate-orderdate "Shipping Delay"
from orders
having max(shipdate-orderdate) >any (select shipdate-orderdate
from orders
where shipdate is not null)
group by shipcity, shipstate, shipdate-orderdate;
無恐怕行不通。我想使用子查詢來獲得最長的運輸延遲。 – Anthony
以任何方式計算?我不明白你爲什麼堅持子查詢。 – fancyPants
@安東尼哦,它是計算。感謝你糟糕的格式化,它不是太明顯。更新了我的答案。請再次嘗試第一個查詢。 – fancyPants