Top "Window-functions" questions

A window function is a type of SQL operation that aggregates over a partition of the result set.

Select a row of first non-null values in a sparse table

Using the following table: A | B | C | ts --+------+------+------------------ 1 | null | null | 2016-06-15 10:00 4 | null | null | 2016-06-15 11:00 4 | 9 | …

sql postgresql null window-functions
Missing window specification for this function

Now getting the following error: ORA-30484: missing window specification for this function 30484. 00000 - "missing window specification for this function" *Cause: …

sql oracle window-functions analytic-functions over-clause
rank() function usage in Spark SQL

Need some pointers in using rank() I have extracted a column from a dataset..need to do the ranking. Dataset&…

java apache-spark apache-spark-sql window-functions rank
Row_number over (Partition by yyy) in Entity Framework

I want to load data by Row_number over Partition by using EF. SELECT * FROM ( SELECT sf.SerialFlowsId ,sf.GoodsSerialId ,…

sql entity-framework window-functions
How to use lag and rangeBetween functions on timestamp values?

I have data that looks like this: userid,eventtime,location_point 4e191908,2017-06-04 03:00:00,18685891 4e191908,2017-06-04 03:04:00,18685891 3136afcb,2017-06-04 03:03:00,18382821 661212…

apache-spark pyspark apache-spark-sql window-functions
Spark Scala : Getting Cumulative Sum (Running Total) Using Analytical Functions

I am implementing the Cumulative Sum in Spark using Window Function. But the order of records input is not maintained …

sql scala apache-spark apache-spark-sql window-functions
Rank function in MySQL with Order By clause

How could this (Oracle) SQL: select a.*, rank() over (partition by a.field1 order by a.field2 desc) field_rank …

mysql oracle window-functions rank
lag to get first non null value since the previous null value

Below is an example of what I'm trying to achieve in a Redshift Database. I have a variable current_value …

sql amazon-redshift lag window-functions
User defined function to be applied to Window in PySpark?

I am trying to apply a user defined function to Window in PySpark. I have read that UDAF might be …

apache-spark pyspark aggregate-functions user-defined-functions window-functions