I tried to construct the query you recommended but when i ran it with over a hundred products it created almost as many buckets and didnt stick to the number of buckets i had wanted. I created another query using MOD and it gave me almost what i was looking for but didnt distribute as evenly as I had hoped for.
UPDATE main FROM prod_list AS main,
(
SEL
PROD_NAME
, QTY_SOLD
, SUM(QTY_SOLD) OVER (ORDER BY NUMOF ROWS UNBOUNDED PRECEDING) RUNNING
FROM prod_list
) inr
SET GROUP_NBR = RUNNING MOD <# of buckets>
WHERE main.PROD_NAME = inr.PROD_NAME ;
I tried to construct the query you recommended but when i ran it with over a hundred products it created almost as many buckets and didnt stick to the number of buckets i had wanted. I created another query using MOD and it gave me almost what i was looking for but didnt distribute as evenly as I had hoped for.