-1
這是不合法的做max(count())
,讓我怎麼完成計算如下所示的貢獻(並同時獲得其它列)計算貢獻
SELECT id,
Avg(time) AS avgSec,
Stdev(time) AS stdevSec,
Count(time) AS cnt,
Avg(time)*Count(time)/max(Count(time)) AS contribution
FROM ...very long and complex query...
可能重複:http://stackoverflow.com/questions/2436820/can-i-do-a-maxcount-in-sql –
什麼是貢獻的公式 –
我不想重複冗長而複雜的查詢 – Cine