SELECT COUNT(*), SUM(demand_status=1), SUM(demand_status=2), SUM(demand_status=3), SUM(demand_status=4) FROM demand;
结果:
135 3 75 35 22
sql统计总数及不同状态总数
最新推荐文章于 2024-07-01 15:06:08 发布
SELECT COUNT(*), SUM(demand_status=1), SUM(demand_status=2), SUM(demand_status=3), SUM(demand_status=4) FROM demand;
结果:
135 3 75 35 22