sql统计总数及不同状态总数

mac2025-10-19  5

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
最新回复(0)