DB 的笔试题

最近一直在面试,遇到一种面试题记录一下留个眼熟吧。 sql: select rstime, sum(case result when '胜' then 1 else 0 end)as 胜, sum(case result when '负' then 1 else 0 end)as 负 from result group by rstime; sql: select pid, sum(CASE di
相关文章
相关标签/搜索