-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