Returns the dense rank within an ordered group of values. Default ordering is in ascending time, so the first value has the lowest rank.
This is a window function (calculates over a group of multiple input rows using windowing.)
make_col index:window(dense_rank(), group_by(category_id), order_by(item_cost))
Assigns a dense rank to items, when ordered by cost, grouped by category. The cheapest item in each category will be given the rank 1, items with the same cost within the same category will receive the same rank. Dense means there are no gaps assigned between ranks.