1. 合计/统计函数
1. count
count 返回行的总数
-- 演示 count 的使用
-- 统计一个班级共有多少学生
select count(*) from student;
-- 统计数学成绩大于 90 的学生有多少个
select count(*) from student where math > 90;
-- 统计总分大于 250 的人数有多少
select count(*) from student where (chinese + english + math) > 250;
-- count(*) 和 count(列)的区别
-- 解释:count(*) 返回满足条件的记录的行数
-- count(列): 统计满足条件的某列有多少个,但是会排除为null的情况
-- 新建一张表测试一下
create table t15 (