Window Function

Rank, row number, lead, lag

What It Does

Window Functions compute values across related rows without collapsing them. Add rankings, running totals, or access adjacent row values.

How to Use It

Opening the Panel

Click the + button in the toolbar or press the operation picker, then search for "Window Function". It's in the Aggregate group.

Configuration

FieldTypeRequiredDescription
FunctionSelectYesrow_number, rank, dense_rank, lead, lag, running_total, sum, avg, min, max
ColumnColumn selectFor value functionsThe column to compute over
Partition byColumn selectNoReset the window for each group
Order byColumn selectRecommendedSort rows within each partition

SQL Generated

SELECT *, ROW_NUMBER() OVER (PARTITION BY category ORDER BY revenue DESC) AS rank FROM data
Try this operation →

Notes

  • Null values are handled gracefully - operations skip or preserve nulls where appropriate.
  • You can edit any pipeline step by clicking on its card to re-open the panel with the same settings.
  • The SQL preview shows exactly what will execute - inspect it before applying.

Related Operations

  • Pivot - Pivot table (rows to columns)
  • Smallest - Get nth smallest value as a column
  • Largest - Get nth largest value as a column