时间:2021-07-01 10:21:17 帮助过:30人阅读
2.两表查询
SELECT a.已上报,a.未上报,a.别名,a.别名,d.关联字段 FROM ( SELECT COUNT(CASE WHEN (字段=值列1) THEN reportstatus END) AS 已上报,COUNT(CASE WHEN (字段=值列0) THEN 字段 END) AS 未上报, 字段部门名称 AS NAME,LEFT(字段编号,限制长度6) AS CODE FROM 表名 WHERE 判断 GROUP BY LEFT(字段编号,限制长度6) ) a,表名 d WHERE 判断a.code = d.code
sql查询count 单独字段不同值
标签:tst HERE end rom bsp 编号 The color span