Skip to content
Advertisement

Tag: window-functions

Why ROW_NUMBER is defined as window function?

I would like to understand better the meaning of window function. The definition says: A window function performs a calculation across a set of table rows (the window) that are somehow related to the current row Let’s consider ROW_NUMBER() (the same could be applied for RANK() or DENSE_RANK()). The function simply assign a number to an ordered set of rows.

SQL Informix advanced query

Let me try to explain what I want to do with my data. Structure of my data is as follows: I have 3 columns: date, id, and stage. Stages can be different numbers, but I’m interested in showing specific transition of some id from stage -1 to stage 1. Please see the example below. I have an id that was

Advertisement