--统计数量 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;
--统计数量 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;
转载于:https://www.cnblogs.com/of-course/p/8360946.html