| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: SQL problem enclosed. SELECTing moving window of values...
In article <p1ajut8orckoa3h8aga7jpnc03q1t4ub07_at_4ax.com>, Remo Williams says...
>
[...]
Is the following somewhere near what you wish for?
select x.m1, x.m2, count(1) as cum_sum from (select distinc
t monthname(a.changedate) as m1, month(a.changedate) as m2, b.* from wostatus a
, wostatus b where a.status = b.status and a.status = 'INPRG' and a.changedate
>= b.changedate and a.changedate <= '3/1/2000' and b.changedate <= '3/1/2000')
as x group by x.m1, x.m2 order by x.m2
M1 M2 CUM_SUM
-------- ------------ ----------- -----------
januari 1 2 februari 2 3 mars 3 4
3 record(s) selected.
/Lennart Received on Thu Nov 08 2001 - 04:20:44 CST
![]() |
![]() |