select t.temp ,count(t.win),count(t.falses) from ( select temp, (case result when '胜' then result end) win, (case result when '负' then result end) falses from test_demo ) t group by t.temp