Calculating Differences Between Rows in SQL — If you have lots of rows that represent changing values (such as time series data, say) being able to calculate the differences between the values over time could be useful, here are some approaches.
Appears in lists (1)
More like this (1)
Fun with SQL: Window functions in Postgres The latest post in our ‘Fun with SQL’ series....Fun with SQL: Window functions in Postgres The latest post in our ‘Fun with SQL’ series. Window functions allow you to compare values between rows that are somehow related to the current row. Example: Finding the first time all users performed some action, Find where all users ranked for some sub-grouping