我有以下内容:
UserID | Number
1 | 100
1 | 200
1 | 300
2 | 20
2 | 21
2 | 22
3 | 333
......
.....
1000| 23
.......
and I want to get the following result:
UserID | Average
1 | 200
2 | 21
3 | 300
......
......
1000 | 200
......
这些价值只是为了了解我在说什么! 提前谢谢!
答案 0 :(得分:0)
答案 1 :(得分:0)
SELECT UserID, AVG(Number) AS Average
FROM YourTable
GROUP BY UserID