SELECT,
ColumnOne,
AVG(ColumnTwo) as ColumnTwoNew,
SUM(ColumnThree) as ColumnThreeNew
FROM
TABLE GROUP BY ColumnOne ORDER BY ColumnTwoNew
SELECT,
ColumnOne,
AVG(ColumnTwo) as ColumnTwoNew,
SUM(ColumnThree) as ColumnThreeNew
FROM
TABLE GROUP BY ColumnOne ORDER BY ColumnTwoNew
本文标题:SQL Server对EXCEL操作_对一列求和,对另一类求平均
本文链接:https://www.haomeiwen.com/subject/mjwijftx.html
网友评论