-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
access to previous/next row values #51
Comments
A way to access other rows via user defined functions could be helpful too. |
How and what should it be done |
Example using window functions: select year,
month,
fixes,
fixes - lag(fixes) over (order by year, month) as increase,
from the_table; source: https://stackoverflow.com/questions/24691462/postgresql-calculate-difference-between-rows References: |
Thank you for the feedback! I agree it would be cool to support window functions including |
I'd like a way to compute the difference between a value in a column with the previous or next value over a partition. I believe several SQL solutions use
LEAD()
andLAG()
functions but there may be other/better ways to do it.The text was updated successfully, but these errors were encountered: