Showing posts with the label window-functions

[FIXED] How to make LAG() ignore NULLS in SQL Server?

Issue Does anyone know how to replace nulls in a column with a string until it hits a new string th…

[FIXED] Spark - Window with recursion? - Conditionally propagating values across rows

Issue I have the following dataframe showing the revenue of purchases. +-------+--------+-------+…

[FIXED] Get last 3 month average on daily data in SQL

Issue I have a sales dataset where I need to calculate last 3 month sales average for each product …

[FIXED] MySQL minus previous row with conditions

Issue In the table below, I'd like to minus the previous rows date from the current rows date a…

[FIXED] Time based window function in Pyspark

Issue My goal is to calculate another column, keeping the same number of rows as the original DataF…

[FIXED] Understanding window function frame with RANGE mode

Issue SELECT sum(unique1) OVER () AS total, sum(unique1) OVER (PARTITION BY four ORDER…

[FIXED] Row number with condition

Issue I want to increase the row number of a partition based on a condition. This

[FIXED] SQL: How to remove duplicate rows?

Issue I have the following data that has certain rows which are implicitly duplicated, but don'…