or is there another possibility to have a weighted average and get the info from a database (json))
e.g.
Product 1: 0,0,1,2,0,1,0,2,0,
Product 2: 0,2,1,0,2,2,0,1,2,0
with choose(), I can weight it by saying e.g. choose(0,0,1,2). That means there are 50%: 0, 25%: 1, 25%: 1
but I want to get the information (0,0,1,2) from the database, because I don't need to program extra variables and compares. Right now I get all the information from the database: cost, price, production time, name,... but not how many products could be sold within a day