ITeye博客

case then sql

yaoweinan · 2011-08-05 17:51 · sql · 非技术 · Markdown

<!--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;

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。