At present, there are only 1 article number and 1 color number, and the corresponding assembly proportion is one group, and so is the order data. You don't need to query directly, just use: min (int (order quantity/transpose)) to get the whole container number of 3, and then subtract 3* assembly ratio from the order number, which is the number of parts.