显然 avg(min()) 给了我一个错误,所以我尝试了这段代码,但它给了我错误的数字。有任何想法吗?
谢谢
select
out_year as "Year",
avg(dwell_time) as "Average",
avg(av.dw_min) as "Minimum",
avg(av.dw_max) as "Maximum"
from
(select min(dwell_time) as dw_min, max(dwell_time) as dw_max
from eq_dwell) av,
eq_dwell ed
where
inv_status = "Offdock"
group by out_year