Ecto.Query.WindowAPI.ntile
You're seeing just the function
ntile
, go back to Ecto.Query.WindowAPI module for more information.
Returns integer ranging from 1 to the argument value, dividing the partition as equally as possible.
from p in Post,
select: ntile(10) |> over(partition_by: p.category_id, order_by: p.date)
Note that this function must be invoked using window function syntax.