MySQL中的sum的用法----统计

数据表的内容: select number,sum( if( score >= 60, score, 0)) as total_score, sum( if( score < 60, 1, 0 )) as sum_notpass from students.score group by number 统计出所有score的score,然后再统计有多少条不及格的记录了。 方便程序用来告诉人们这条记录
相关文章
相关标签/搜索