我想添加ID的值。例如
ID Values
----------
b1 100
c2 100
c3 100
b1 50
现在我要添加这样的id 1值
ID Values
----------
b1 150
c2 100
c3 100
为此应编写哪个sql查询
答案 0 :(得分:0)
查询
passwd.expect('(?i)password:')
结果
SELECT
Table1.ID
, SUM(Table1.Values) AS `values`
FROM
Table1
GROUP BY
Table1.ID
order BY
Table1.ID