I have the following dummy table.
+----+-------+-------+-----+--------+
| Id |Marks |Grade |GId |Gender |
+----+-------+-------+-----+--------+
| 1 | 95 | S | 1 | 1 |
| 2 | 95 | S | 1 | 0 |
| 3 | 93 | S | 1 | 0 |
| 4 | 75 | B | 3 | 1 |
| 5 | 74 | B | 3 | 1 |
| 6 | 83 | A | 2 | 0 |
| 7 | 83 | A | 2 | 0 |
| 8 | 83.5 | A | 2 | 0 |
| 9 | 70 | B | 3 | 0 |
| 10 | 71 | B | 3 | 1 |
| 11 | 96 | S | 1 | 1 |
| 12 | 60 | C | 4 | 1 |
| 13 | 65 | C | 4 | 0 |
| 14 | 62 | C | 4 | 0 |
| 15 | 71 | B | 3 | 1 |
+----+-------+-------+-----+--------+
I want to devide it in some random no. of sections.
- Say 3 SECTIONS SEC A=5, SEC B=5,SEC C=5 students e.g.
A=[SABCS],B=[SABCB],C=[SABCB] //Grades
- Say 4 SECTIONS SEC A=4, SEC B=4,SEC C=4, SEC D=3 students e.g.
A=[SABC],B=[SABC],C=[SABC], D=[SBB] //Grades
- Say 2 SECTIONS SEC A=8, SEC B=7 students e.g.
A=[SABCSABC],B=[SABCSBB] //Grades
I followed the link got the results but has lots of limitations of balanced distributation.
how can i set and get the required result where section division will be dynamic.
- MYSQL will be a preferable.
2.Through java/else coding will be also acceptable.
N.B.:UPDATING for who doesnt get it.
PLEASE see the table and corresponding grades.Then divide the grades(actually students) in each section. Each section should/must contain every grade students. That is why I mensioned BALANCED DISTRIBUTATION.