胜负问题的面试题
select 日期,
(select count(*) from game where 结果=’胜’and 日期=g.日期) as 胜,
(select count(*) from game where 结果=’负’and 日期=g.日期)
as 负from game g group by 日期
胜负问题的面试题
select 日期,
(select count(*) from game where 结果=’胜’and 日期=g.日期) as 胜,
(select count(*) from game where 结果=’负’and 日期=g.日期)
as 负from game g group by 日期