Explore Library
Databases & SQLWindow Functions

32 items

Quiz

Leak-Free Rolling Features

Choosing a window frame that excludes the current row prevents target leakage in engineered features.

You are building a churn model. For each customer order (ordered by order_date), you want a feature equal to the average of that customer's PAST order amounts, excluding the current order, to avoid leaking information from the row you are predicting. Which windowed expression produces this correctly?