如果我有这张桌子:
Column1 Column2 Column3
20 NULL 3/27/2012
NULL 50 3/27/2012
NULL 40 3/27/2012
我怎样才能把它变成:
Column1 Column2 Column3
20 90 3/27/2012
谢谢!
答案 0 :(得分:4)
试试这个
SELECT SUM(Column1) Column1, SUM(Column2) Column2, Column3
FROM Table1
GROUP BY Column3