Ecto.Query.WindowAPI.lead

You're seeing just the function lead, go back to Ecto.Query.WindowAPI module for more information.
Link to this function

lead(value, offset \\ 1, default \\ nil)

View Source

Returns value evaluated at the row that is offset rows after the current row within the partition.

If there is no such row, instead return default (which must be of the same type as value). Both offset and default are evaluated with respect to the current row. If omitted, offset defaults to 1 and default to nil.

from e in Events,
     windows: [w: [partition_by: e.name, order_by: e.tick],
     select: {
       e.tick,
       e.action,
       e.name,
       lag(e.action) |> over(:w), # previous_action
       lead(e.action) |> over(:w) # next_action
     }

Note that this function must be invoked using window function syntax.