Below query getting error, can you please help me fix the below error,
How can achieve SQL server LEAD functionality in Teiid ?
PI."time" AS STARTTIME,
LEAD(PI."time") over ( order by PI."time") AS ENDTIME,
DIGSTRING(CONVERT(PI.status,INTEGER)) AS ICV_STATE_VALUE
FROM "piarchive"."picomp" PI
PI.tag = 'BA:ACTIVE.1' AND
PI.time BETWEEN '2018-02-28' AND '2018-03-01'
Error: TEIID30068 Remote org.teiid.api.exception.query.QueryResolverException: TEIID30068 The function 'LEAD(ALL PI."time")' is an unknown form. Check that the function name and number of arguments is correct.
> How can achieve SQL server LEAD functionality in Teiid ?
What Teiid version are you using? Built-in lead/lag was added with [TEIID-4646] Add engine support for lead/lag aggregate functions - JBoss Issue Tracker in 9.3.