Home > Database > Mysql Tutorial > SQL 平均数统计

SQL 平均数统计

WBOY
Release: 2016-06-07 17:57:39
Original
2167 people have browsed it

sql下求列的平均数的语句

代码如下:
SELECT CAST(SUM(score_comments_) / COUNT(*) AS decimal) AS score
FROM Comments_Toysgogo_
WHERE (aboutid_comments_ = 81) AND (table_comments_ = 'product')

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template