select
sum(casewhena1=1then1else0end)asa1count,
sum(casewhena2=1then1else0end)asa2count,
sum(casewhena3=1then1else0end)asa3count,
sum(casewhena4=1then1else0end)asa4count
from表
时间:2020-11-22 12:38:06
select
sum(casewhena1=1then1else0end)asa1count,
sum(casewhena2=1then1else0end)asa2count,
sum(casewhena3=1then1else0end)asa3count,
sum(casewhena4=1then1else0end)asa4count
from表
mysql两表关联查询和子查询的区别 – 数据库 – 前端 mysql指定ip连接
2021-08-14