SELECT carrid, currency, fldate,
COUNT( * ) OVER( ORDER BY currency, fldate
ROWS BETWEEN
UNBOUNDED PRECEDING
AND CURRENT ROW ) AS count1,
COUNT( * ) OVER( ORDER BY currency, fldate ) AS count2,
COUNT( * ) OVER( ORDER BY currency, fldate
ROWS BETWEEN CURRENT ROW
AND UNBOUNDED FOLLOWING ) AS count_reverse,
AVG( price AS DEC( 14,2 ) ) OVER( ORDER BY currency, fldate
ROWS BETWEEN
1 PRECEDING
AND 1 FOLLOWING ) AS avg
FROM zdemo_abap_fli
INTO TABLE @DATA(result).
[x] INDICATORS
UPDATE dbtab FROM TABLE @ind_tab INDICATORS SET STRUCTURE comp_ind.
[x] ACCORDING
ADD numbers-one THEN numbers-two
UNTIL numbers-five
ACCORDING TO position
GIVING sum
RANGE test.
[ ] UNBOUNDED, PRECEDING, FOLLOWING
[x] INDICATORS