count() 函数返回匹配指定条件的行数。
– 查询所有记录的条数
select count(*) from as nums access_log;
– 查询websites 表中 alexa列中不为空的记录的条数
select count(alexa) from as nums websites;
– 查询websites表中 country列中不重复的记录条数
select count(distinct country) as nums from websites;
count() 函数返回匹配指定条件的行数。
– 查询所有记录的条数
select count(*) from as nums access_log;
– 查询websites 表中 alexa列中不为空的记录的条数
select count(alexa) from as nums websites;
– 查询websites表中 country列中不重复的记录条数
select count(distinct country) as nums from websites;