1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | create table test(Date varchar(50) null , Result varchar(50) null ) insert into test values( '1900-1-1' , '胜' ) insert into test values( '1900-2-1' , '胜' ) insert into test values( '1900-1-1' , '负' ) insert into test values( '1900-2-1' , '负' ) insert into test values( '1900-1-1' , '胜' ) select * from test select distinct Date, sum( case Result when '胜' then 1 else 0 end) as '胜' , sum( case Result when '负' then 1 else 0 end) as '负' from test group by date select ( case Gender when 1 then '男' when 2 then '女' else '其他' end) as Gender from Table1 |
努力加载评论中...
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步