看板 Database 關於我們 聯絡資訊
請問這樣寫有錯嗎? 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
icydream:select的欄位,與group by的欄位不符 02/24 17:41
icydream:改為select concat(binary bid), sum(num)試試, 02/24 17:42
icydream:或是再重新調整group by的欄位。 02/24 17:43