[SQL ] Invalid use of group function
請問這樣寫有錯嗎?
SELECT sid, bid, SUM(num) FROM mydbtable WHERE gdate>=
'2013-02-18' and gdate<= '2013-02-22' and SUM(num)/SUM(num/percentage)>0.05
GROUP BY concat(binary bid)
附註:sid, bid, num, percentage為table欄位
產生的錯誤為Invalid use of group function
找了很久,不曉得是哪邊錯誤呢?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 219.71.217.130
推
02/24 17:41, , 1F
02/24 17:41, 1F
→
02/24 17:42, , 2F
02/24 17:42, 2F
→
02/24 17:43, , 3F
02/24 17:43, 3F