>各支店ごとの部
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+OBlOOBqOOBrumDqApzZWxlY3QKCeaUr+W6lywKCemDqCwKCXN1bSjln7rmnKzntaYpLAoJc3VtKOW9ueiBt+aJi+W9kyksCglzdW0oKOWfuuacrOe1pivlvbnogbfmiYvlvZMpLzE2MCoxLjIpLAoJc3VtKOWfuuacrOe1pivlvbnogbfmiYvlvZMrKCjln7rmnKzntaYr5b256IG35omL5b2TKS8xNjAqMS4yKSkKZnJvbQoJ57Wm5LiO44Gu5pSv57WmCmdyb3VwIGJ5CgnmlK/lupcsCgnpg6gKOwoKPuWQhOaUr+W6l+OBlOOBqOOBruiqsgpzZWxlY3QKCeaUr+W6lywKCeiqsiwKCShzdW0sZnJvbeecgeeVpSkKZ3JvdXAgYnkKCeaUr+W6lywKCeiqsgo7Cgo+5pSv5bqX5ZCI6KiICnNlbGVjdAoJ5pSv5bqXLAoJKHN1bSxmcm9t55yB55WlKQpncm91cCBieQoJ5pSv5bqXCjsKCj7nt4/lkIjoqIgKc2VsZWN0Cgkoc3VtLGZyb23nnIHnlaUpCjs=