我使用 count 和 group by 函数从两个不同的表中得到一个派生表,其输出是这样的。
Department DeptID Count(noofemployees)
HR 1 60
Accounting 19 7
Computers 4 67
Sys admin 6 5
Finance 3 15
Admin 9 12
现在我正在尝试添加和显示
HR + Accounting + Finance = 10 + 7 + 13 = 30 as HR
Computers + Sys admin = 65 + 5 =70 as Computers
Department DeptID Count(noofemployees)
HR 1 30
Computers 4 70
Admin 9 12
你能帮帮我吗?