case then sql
<!--StartFragment -->
得到<!--StartFragment -->
的sql
select t.date,sum(case when t.score='胜' then 1 else 0 end) 胜,sum(case when t.score='败' then 1 else 0 end) 败
from test t group by t.shijain;
<!--StartFragment -->
得到<!--StartFragment -->
的sql
select t.date,sum(case when t.score='胜' then 1 else 0 end) 胜,sum(case when t.score='败' then 1 else 0 end) 败
from test t group by t.shijain;
暂无评论。
评论功能维护中,当前仅展示历史评论。