ORACLE SUM OVER PARTITION (WITH CONDITION)
--------------------------------------------------------------------------------
SELECT LV, SUM(LV) OVER(PARTITION BY FLAG ORDER BY RN) SUMOVER
FROM (SELECT ROWNUM RN, '99' AS FLAG, LEVEL LV
FROM DUAL
CONNECT BY LEVEL < 100
ORDER BY 3)