MySQL查詢某個字段爲某值的次數統計SQL語句

SELECT GoodID,sum(if(Level = 1, 1, 0)) as Better,sum(if(Level = 0, 1, 0)) as Nomal,sum(if(Level = -1, 1, 0)) as Bad from evaluates GROUP BY GoodID;SELECT GoodID,sum(if(Level = 1, 1, 0)) as Better,sum(
相關文章
相關標籤/搜索