SELECT SUM(CASE WHEN STATE=1 THEN 1 ELSE 0 END),SUM(CASE WHEN STATE=2 THEN 1 ELSE 0 END),SUM(CASE WHEN STATE=3 THEN 1 ELSE 0 END),SUM(CASE WHEN STATE=4 THEN 1 ELSE 0 END)FROM TB
本文共 177 字,大约阅读时间需要 1 分钟。
SELECT SUM(CASE WHEN STATE=1 THEN 1 ELSE 0 END),SUM(CASE WHEN STATE=2 THEN 1 ELSE 0 END),SUM(CASE WHEN STATE=3 THEN 1 ELSE 0 END),SUM(CASE WHEN STATE=4 THEN 1 ELSE 0 END)FROM TB
转载地址:http://nvfxa.baihongyu.com/