当前位置: 数据库>sqlserver
SQL 平均数统计
来源: 互联网 发布时间:2014-09-05
本文导语: 代码如下:SELECT CAST(SUM(score_comments_) / COUNT(*) AS decimal) AS score FROM Comments_Toysgogo_ WHERE (aboutid_comments_ = 81) AND (table_comments_ = 'product')
代码如下:
SELECT CAST(SUM(score_comments_) / COUNT(*) AS decimal) AS score
FROM Comments_Toysgogo_
WHERE (aboutid_comments_ = 81) AND (table_comments_ = 'product')