--统计数量
select count(*) from table;
--统计某一列的数量(去空)
select count(col) from table;
--统计某一列的值大于或小于另一个值的数量(去不去空没试过)
select count(CASE when t.column_name>0 then 'name' end) as new_name from table;

 

相关文章: