2010-09-29 31 views

回答

2
select myvalue, sum(weight) as freq from mytable group by myvalue; 
3

您想使用Sum集合函數來處理這個問題。

SELECT MyValue, Sum(weight) AS Total 
FROM mytable 
GROUP BY myvalue; 

應該訣竅!

2
select myvalue, SUM(weight) as freq from mytable group by myvalue; 
1

使用sum(weight) as freq在您選擇查詢