db.l3.ai

Play

lessons

what-changed-in-19

editor

engine: not started

results

Run a query to see rows here.

check

lag

lag(x) reads x from the previous row of the window; the first row gets NULL.

task

Days since the customer's previous order, for each order: columns order_id and the day difference (NULL for the first order). Dates are placed_at cast to date.

hints