扫码关注官方订阅号
请问上面图片中的result列值作为新表的字段名称,这个该如何实现,求指点,谢谢各位
认证0级讲师
select date,sum(case when result='win' then 1 else 0 end) win,sum(case when result='lose' then 1 else 0 end) lose from tbl group by date;
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
认证0级讲师