regarding selecting required data
i am having first five records from the table by looping it , now the main problem is that i have combinations like
S1[ 93X 1]S2[415X 1]S3[249X 1]S4[230X 2]S5[215X 0]
S1[ 93X 1]S2[415X 0]S3[249X 1]S4[230X 1]
S1[ 93X 1]S2[415X 0]S3[249X 1]
these r the combinations drived from the system with the scrap being 0.
now what i want is how can i get the best combinations from the above combinations which is having more number of combinations from the above three