-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Description
It has been observed that the LEAD and LAG window functions are not producing the expected results when used in our SQL queries. These functions are intended to access data from subsequent or preceding rows within the same result set, but they appear to be accepted among the windows functions
Steps to Reproduce
Use the LEAD or LAG window functions in a SQL query.
Compare the output with the expected results.
Expected Behavior
The LEAD function should return the value from the next row, and the LAG function should return the value from the previous row, as per their functionality.
Actual Behavior
Used the following query:
select id,name, LEAD(name,1) OVER (ORDER BY x)
from table
limit 10
Error obtained when using LEAD or LAG functions

