>各支店ごとの部、
select
部,
sum(基本給),
sum(役職手当),
sum((基本給+役職手当)/160*1.2),
sum(基本給+役職手当+((基本給+役職手当)/160*1.2))
from
給与の支給
group by
部
;
>課の合計、
select
課,
(sum,from省略)
group by
課
;
>支店合計
select
支店,
(sum,from省略)
group by
支店
;
>総合計
select
(sum,from省略)
;
PuWQhOaUr+W6l+OBlOOBqOOBrumDqOOAgQpzZWxlY3QKCemDqCwKCXN1bSjln7rmnKzntaYpLAoJc3VtKOW9ueiBt+aJi+W9kyksCglzdW0oKOWfuuacrOe1pivlvbnogbfmiYvlvZMpLzE2MCoxLjIpLAoJc3VtKOWfuuacrOe1pivlvbnogbfmiYvlvZMrKCjln7rmnKzntaYr5b256IG35omL5b2TKS8xNjAqMS4yKSkKZnJvbQoJ57Wm5LiO44Gu5pSv57WmCmdyb3VwIGJ5Cgnpg6gKOwoKPuiqsuOBruWQiOioiOOAgQpzZWxlY3QKCeiqsiwKCShzdW0sZnJvbeecgeeVpSkKZ3JvdXAgYnkKCeiqsgo7Cgo+5pSv5bqX5ZCI6KiICnNlbGVjdAoJ5pSv5bqXLAoJKHN1bSxmcm9t55yB55WlKQpncm91cCBieQoJ5pSv5bqXCjsKCj7nt4/lkIjoqIgKc2VsZWN0Cgkoc3VtLGZyb23nnIHnlaUpCjs=