Hi everyone.
I have a table that has following fields:
dept, emp, hours, etc.
I want (a) hours for each dept and (b)then total of all depts at the end
Dept Hours
A 10
B 20
C 25
55
------------------
I wrote following
select dept, sum(hours)
where ---------
group by dept
above works fine for (a) but when I add
compute sum(hours) at end, It doesn't work.
Any ideas?
I have a table that has following fields:
dept, emp, hours, etc.
I want (a) hours for each dept and (b)then total of all depts at the end
Dept Hours
A 10
B 20
C 25
55
------------------
I wrote following
select dept, sum(hours)
where ---------
group by dept
above works fine for (a) but when I add
compute sum(hours) at end, It doesn't work.
Any ideas?