SELECT COUNT(*) AS AllCount,t.AssignedCount,(COUNT(*)-t.AssignedCount) AS
UnassignedCount
FROM 药品表
jOIN
(
SELECT COUNT(*) AS
AssignedCount
FROM 质量分析分配表
)as t on 1=1
group by
t.AssignedCount
2023-11-24 12:51:22
SELECT COUNT(*) AS AllCount,t.AssignedCount,(COUNT(*)-t.AssignedCount) AS
UnassignedCount
FROM 药品表
jOIN
(
SELECT COUNT(*) AS
AssignedCount
FROM 质量分析分配表
)as t on 1=1
group by
t.AssignedCount