SQL Server对EXCEL操作_对一列求和,对另一类求平均值,并且分组排序

SELECT,

ColumnOne,

AVG(ColumnTwo) as ColumnTwoNew,

SUM(ColumnThree) as ColumnThreeNew

FROM

TABLE GROUP BY ColumnOne ORDER BY ColumnTwoNew

你可能感兴趣的:(SQL Server对EXCEL操作_对一列求和,对另一类求平均值,并且分组排序)