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(if(Level = 0, 1, 0)) as Nomal,sum(if(Level = -1, 1, 0)) as Bad from evaluates GROUP BY GoodID;