select
时间,
SUM
(
case
when
win=
'胜'
then
1
else
0
end
) 胜,
'负'
) 负
from
tb
group by 时间
group
by
时间
case相当于if.....else 条件语句