ITeye博客

行转列

fish8077 · 2011-07-19 13:42 · 数据库 · Markdown


select customid,   
    count(case status when 0 then status else null end) as status-0,   
    count(case status when 1 then status else null end) as status-1,   
    count(case status when 2 then status else null end) as status-2   
    from custom group by customid.  

评论(0)

暂无评论。

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