
這是欄位
這是我寫的陳述句
select a.channel,b.fo
from chb_order_form a
join
(
select channel,finish_time-order_time fo
from chb_order_form
) b
on a.channel=b.channel
group by a.channel;
報錯
FAILED: SemanticException [Error 10025]: Line 1:17 Expression not in GROUP BY key 'fo'
uj5u.com熱心網友回復:
仍然有問題select a.channel,(b.sft-b.sot)/b.cft
from chb_order_form a
join(
select channel cl,sum(order_time) sot,sum(finish_time) sft,count(finish_time) cft
from chb_order_form
group by channel) b
on a.channel=b.cl
group by a.channel;
uj5u.com熱心網友回復:
select b.cl,(b.sft-b.sot)/b.cftfrom(
select channel cl,sum(order_time) sot,sum(finish_time) sft,count(finish_time) cft
from chb_order_form
group by channel) b;
uj5u.com熱心網友回復:
你想表達什么?轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/38015.html
標籤:基礎類
下一篇:MySQL安裝出錯怎么辦
