OLAP Sliding Windows..... Max amount

Database

OLAP Sliding Windows..... Max amount

Hi all,

I am running a simple query that uses the OLAP functions to get the next 60 period end dates that are stored in my table.

The below query works perfectly for the first 50 periods and then returns NULLs for the last 10. If I run the query as two seperate queries (e.g.1-30 and 30-60) it returns the correct answers.

Is there a limit to the  sliding window size in Teradata? Hopefully, its just a configuration setting somewhere  as 50 seems pretty low !

Query:

sel
test.emp_id
,test.period_dte
,test.PERIOD_DTE AS EMP_PERIOD_DTE_0
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 1 FOLLOWING AND 1 FOLLOWING) AS EMP_PERIOD_DTE_1
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 2 FOLLOWING AND 2 FOLLOWING) AS EMP_PERIOD_DTE_2
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 3 FOLLOWING AND 3 FOLLOWING) AS EMP_PERIOD_DTE_3
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 4 FOLLOWING AND 4 FOLLOWING) AS EMP_PERIOD_DTE_4
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 5 FOLLOWING AND 5 FOLLOWING) AS EMP_PERIOD_DTE_5
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 6 FOLLOWING AND 6 FOLLOWING) AS EMP_PERIOD_DTE_6
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 7 FOLLOWING AND 7 FOLLOWING) AS EMP_PERIOD_DTE_7
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 8 FOLLOWING AND 8 FOLLOWING) AS EMP_PERIOD_DTE_8
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 9 FOLLOWING AND 9 FOLLOWING) AS EMP_PERIOD_DTE_9
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 10 FOLLOWING AND 10 FOLLOWING) AS EMP_PERIOD_DTE_10
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 11 FOLLOWING AND 11 FOLLOWING) AS EMP_PERIOD_DTE_11
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 12 FOLLOWING AND 12 FOLLOWING) AS EMP_PERIOD_DTE_12
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 13 FOLLOWING AND 13 FOLLOWING) AS EMP_PERIOD_DTE_13
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 14 FOLLOWING AND 14 FOLLOWING) AS EMP_PERIOD_DTE_14
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 15 FOLLOWING AND 15 FOLLOWING) AS EMP_PERIOD_DTE_15
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 16 FOLLOWING AND 16 FOLLOWING) AS EMP_PERIOD_DTE_16
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 17 FOLLOWING AND 17 FOLLOWING) AS EMP_PERIOD_DTE_17
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 18 FOLLOWING AND 18 FOLLOWING) AS EMP_PERIOD_DTE_18
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 19 FOLLOWING AND 19 FOLLOWING) AS EMP_PERIOD_DTE_19
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 20 FOLLOWING AND 20 FOLLOWING) AS EMP_PERIOD_DTE_20
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 21 FOLLOWING AND 21 FOLLOWING) AS EMP_PERIOD_DTE_21
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 22 FOLLOWING AND 22 FOLLOWING) AS EMP_PERIOD_DTE_22
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 23 FOLLOWING AND 23 FOLLOWING) AS EMP_PERIOD_DTE_23
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 24 FOLLOWING AND 24 FOLLOWING) AS EMP_PERIOD_DTE_24
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 25 FOLLOWING AND 25 FOLLOWING) AS EMP_PERIOD_DTE_25
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 26 FOLLOWING AND 26 FOLLOWING) AS EMP_PERIOD_DTE_26
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 27 FOLLOWING AND 27 FOLLOWING) AS EMP_PERIOD_DTE_27
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 28 FOLLOWING AND 28 FOLLOWING) AS EMP_PERIOD_DTE_28
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 29 FOLLOWING AND 29 FOLLOWING) AS EMP_PERIOD_DTE_29
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 30 FOLLOWING AND 30 FOLLOWING) AS EMP_PERIOD_DTE_30
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 31 FOLLOWING AND 31 FOLLOWING) AS EMP_PERIOD_DTE_31
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 32 FOLLOWING AND 32 FOLLOWING) AS EMP_PERIOD_DTE_32
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 33 FOLLOWING AND 33 FOLLOWING) AS EMP_PERIOD_DTE_33
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 34 FOLLOWING AND 34 FOLLOWING) AS EMP_PERIOD_DTE_34
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 35 FOLLOWING AND 35 FOLLOWING) AS EMP_PERIOD_DTE_35
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 36 FOLLOWING AND 36 FOLLOWING) AS EMP_PERIOD_DTE_36
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 37 FOLLOWING AND 37 FOLLOWING) AS EMP_PERIOD_DTE_37
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 38 FOLLOWING AND 38 FOLLOWING) AS EMP_PERIOD_DTE_38
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 39 FOLLOWING AND 39 FOLLOWING) AS EMP_PERIOD_DTE_39
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 40 FOLLOWING AND 40 FOLLOWING) AS EMP_PERIOD_DTE_40
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 41 FOLLOWING AND 41 FOLLOWING) AS EMP_PERIOD_DTE_41
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 42 FOLLOWING AND 42 FOLLOWING) AS EMP_PERIOD_DTE_42
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 43 FOLLOWING AND 43 FOLLOWING) AS EMP_PERIOD_DTE_43
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 44 FOLLOWING AND 44 FOLLOWING) AS EMP_PERIOD_DTE_44
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 45 FOLLOWING AND 45 FOLLOWING) AS EMP_PERIOD_DTE_45
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 46 FOLLOWING AND 46 FOLLOWING) AS EMP_PERIOD_DTE_46
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 47 FOLLOWING AND 47 FOLLOWING) AS EMP_PERIOD_DTE_47
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 48 FOLLOWING AND 48 FOLLOWING) AS EMP_PERIOD_DTE_48
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 49 FOLLOWING AND 49 FOLLOWING) AS EMP_PERIOD_DTE_49
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 50 FOLLOWING AND 50 FOLLOWING) AS EMP_PERIOD_DTE_50
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 51 FOLLOWING AND 51 FOLLOWING) AS EMP_PERIOD_DTE_51
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 52 FOLLOWING AND 52 FOLLOWING) AS EMP_PERIOD_DTE_52
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 53 FOLLOWING AND 53 FOLLOWING) AS EMP_PERIOD_DTE_53
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 54 FOLLOWING AND 54 FOLLOWING) AS EMP_PERIOD_DTE_54
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 55 FOLLOWING AND 55 FOLLOWING) AS EMP_PERIOD_DTE_55
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 56 FOLLOWING AND 56 FOLLOWING) AS EMP_PERIOD_DTE_56
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 57 FOLLOWING AND 57 FOLLOWING) AS EMP_PERIOD_DTE_57
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 58 FOLLOWING AND 58 FOLLOWING) AS EMP_PERIOD_DTE_58
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 59 FOLLOWING AND 59 FOLLOWING) AS EMP_PERIOD_DTE_59
,MAX(test.PERIOD_DTE) OVER (PARTITION BY test.emp_id ORDER BY test.period_dte ROWS BETWEEN 60 FOLLOWING AND 60 FOLLOWING) AS EMP_PERIOD_DTE_60
FROM mytemptable test
WHERE test.period_dte between cast('2006-11-30' as date) and cast('2012-11-30' as date)

Any help appreciated!

Thanks in advance

2 REPLIES
Supporter

Re: OLAP Sliding Windows..... Max amount

Hi,

I can reproduce this on a 13.10 system with below SQL based on sys_calendar.

Would consider this as a bug as NULL is not the correct value for this. So would expect either a correct result or a error message. So you might open an incident.

select top 100 year_of _calendar as c_year
,calendar_date as c_date
,calendar_date as PERIOD_DTE _ 0
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 1 FOLLOWING AND 1 FOLLOWING) AS EMP_PERIOD _DTE _ 1
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 2 FOLLOWING AND 2 FOLLOWING) AS EMP_PERIOD _DTE _ 2
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 3 FOLLOWING AND 3 FOLLOWING) AS EMP_PERIOD _DTE _ 3
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 4 FOLLOWING AND 4 FOLLOWING) AS EMP_PERIOD _DTE _ 4
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 5 FOLLOWING AND 5 FOLLOWING) AS EMP_PERIOD _DTE _ 5
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 6 FOLLOWING AND 6 FOLLOWING) AS EMP_PERIOD _DTE _ 6
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 7 FOLLOWING AND 7 FOLLOWING) AS EMP_PERIOD _DTE _ 7
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 8 FOLLOWING AND 8 FOLLOWING) AS EMP_PERIOD _DTE _ 8
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 9 FOLLOWING AND 9 FOLLOWING) AS EMP_PERIOD _DTE _ 9
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 10 FOLLOWING AND 10 FOLLOWING) AS EMP_PERIOD _DTE _ 10
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 11 FOLLOWING AND 11 FOLLOWING) AS EMP_PERIOD _DTE _ 11
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 12 FOLLOWING AND 12 FOLLOWING) AS EMP_PERIOD _DTE _ 12
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 13 FOLLOWING AND 13 FOLLOWING) AS EMP_PERIOD _DTE _ 13
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 14 FOLLOWING AND 14 FOLLOWING) AS EMP_PERIOD _DTE _ 14
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 15 FOLLOWING AND 15 FOLLOWING) AS EMP_PERIOD _DTE _ 15
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 16 FOLLOWING AND 16 FOLLOWING) AS EMP_PERIOD _DTE _ 16
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 17 FOLLOWING AND 17 FOLLOWING) AS EMP_PERIOD _DTE _ 17
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 18 FOLLOWING AND 18 FOLLOWING) AS EMP_PERIOD _DTE _ 18
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 19 FOLLOWING AND 19 FOLLOWING) AS EMP_PERIOD _DTE _ 19
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 20 FOLLOWING AND 20 FOLLOWING) AS EMP_PERIOD _DTE _ 20
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 21 FOLLOWING AND 21 FOLLOWING) AS EMP_PERIOD _DTE _ 21
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 22 FOLLOWING AND 22 FOLLOWING) AS EMP_PERIOD _DTE _ 22
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 23 FOLLOWING AND 23 FOLLOWING) AS EMP_PERIOD _DTE _ 23
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 24 FOLLOWING AND 24 FOLLOWING) AS EMP_PERIOD _DTE _ 24
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 25 FOLLOWING AND 25 FOLLOWING) AS EMP_PERIOD _DTE _ 25
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 26 FOLLOWING AND 26 FOLLOWING) AS EMP_PERIOD _DTE _ 26
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 27 FOLLOWING AND 27 FOLLOWING) AS EMP_PERIOD _DTE _ 27
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 28 FOLLOWING AND 28 FOLLOWING) AS EMP_PERIOD _DTE _ 28
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 29 FOLLOWING AND 29 FOLLOWING) AS EMP_PERIOD _DTE _ 29
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 30 FOLLOWING AND 30 FOLLOWING) AS EMP_PERIOD _DTE _ 30
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 31 FOLLOWING AND 31 FOLLOWING) AS EMP_PERIOD _DTE _ 31
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 32 FOLLOWING AND 32 FOLLOWING) AS EMP_PERIOD _DTE _ 32
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 33 FOLLOWING AND 33 FOLLOWING) AS EMP_PERIOD _DTE _ 33
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 34 FOLLOWING AND 34 FOLLOWING) AS EMP_PERIOD _DTE _ 34
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 35 FOLLOWING AND 35 FOLLOWING) AS EMP_PERIOD _DTE _ 35
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 36 FOLLOWING AND 36 FOLLOWING) AS EMP_PERIOD _DTE _ 36
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 37 FOLLOWING AND 37 FOLLOWING) AS EMP_PERIOD _DTE _ 37
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 38 FOLLOWING AND 38 FOLLOWING) AS EMP_PERIOD _DTE _ 38
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 39 FOLLOWING AND 39 FOLLOWING) AS EMP_PERIOD _DTE _ 39
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 40 FOLLOWING AND 40 FOLLOWING) AS EMP_PERIOD _DTE _ 40
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 41 FOLLOWING AND 41 FOLLOWING) AS EMP_PERIOD _DTE _ 41
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 42 FOLLOWING AND 42 FOLLOWING) AS EMP_PERIOD _DTE _ 42
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 43 FOLLOWING AND 43 FOLLOWING) AS EMP_PERIOD _DTE _ 43
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 44 FOLLOWING AND 44 FOLLOWING) AS EMP_PERIOD _DTE _ 44
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 45 FOLLOWING AND 45 FOLLOWING) AS EMP_PERIOD _DTE _ 45
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 46 FOLLOWING AND 46 FOLLOWING) AS EMP_PERIOD _DTE _ 46
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 47 FOLLOWING AND 47 FOLLOWING) AS EMP_PERIOD _DTE _ 47
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 48 FOLLOWING AND 48 FOLLOWING) AS EMP_PERIOD _DTE _ 48
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 49 FOLLOWING AND 49 FOLLOWING) AS EMP_PERIOD _DTE _ 49
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 50 FOLLOWING AND 50 FOLLOWING) AS EMP_PERIOD _DTE _ 50
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 51 FOLLOWING AND 51 FOLLOWING) AS EMP_PERIOD _DTE _ 51
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 52 FOLLOWING AND 52 FOLLOWING) AS EMP_PERIOD _DTE _ 52
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 53 FOLLOWING AND 53 FOLLOWING) AS EMP_PERIOD _DTE _ 53
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 54 FOLLOWING AND 54 FOLLOWING) AS EMP_PERIOD _DTE _ 54
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 55 FOLLOWING AND 55 FOLLOWING) AS EMP_PERIOD _DTE _ 55
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 56 FOLLOWING AND 56 FOLLOWING) AS EMP_PERIOD _DTE _ 56
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 57 FOLLOWING AND 57 FOLLOWING) AS EMP_PERIOD _DTE _ 57
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 58 FOLLOWING AND 58 FOLLOWING) AS EMP_PERIOD _DTE _ 58
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 59 FOLLOWING AND 59 FOLLOWING) AS EMP_PERIOD _DTE _ 59
,MAX(calendar_date) OVER (PARTITION BY year_of _calendar ORDER BY calendar_date ROWS BETWEEN 60 FOLLOWING AND 60 FOLLOWING) AS EMP_PERIOD _DTE _ 60

from sys_calendar.calendar

Re: OLAP Sliding Windows..... Max amount

New to posting (/wave), but wondering if anything came of this. I'm using a 14.01 system and I'm getting the same type of data returns as above. The first 50 periods have data as expected, then at data point 51 data is no longer returned. Appreciate the help.

-Josh