图片中的第二题
我只能查询到这一步,行数多了,列数少一个,怎么用子查询做到啊?
收起
select t.日期, (select count(*) from 表名 t1 where t.日期 = t1.日期 and t1.战绩 = '胜') as '胜',(select count(*) from 表名 t1 where t.日期 = t1.日期 and t1.战绩 = '负') '负' FROM 表名 t group by t.日期
报告相同问题?