SELECT dotime,(select count(*) FROM `test1` as a where result='胜' and a.dotime=b.dotime) as 胜, (select count(*) FROM `test1` as c where result='负' and c.dotime=b.dotime) as 负 FROM `test1` as b GROUP BY dotime;