Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> SQLPLUS QUESTION
This is a really dumb ( I am having a mental block as I am writting
this code as an SQL*PLUS script).
here is the question:
I have a table
tbl_x col1 col2 date_col 1 450 01/12/97:0100 2 50 01/12/97:0100 3 5 01/12/97:0100 1 199 01/12/97:0200 2 100 01/12/97:0200 3 5 01/12/97:0200
. . .
. . .
. . .
I nead to do a rollup the totals based on time
Namely ( Phesudo code)
select sum(col2),date_col from tbl_x group by date_col
with the output looking like
Sum(col2) Date_col
505 01/12/97:0100 304 01/12/97:0200 . . . .
any thoughts on how I can accomplish this
thanks: