Hi All!
I am trying to update the existing column based ob some condition.
This is the input data :
| Group | class | roll_no |
| aa | a | 1 |
| | b | 2 |
| aa | c | 3 |
| | d | 4 |
| | e | 5 |
| aa | f | 6 |
| | g | 7 |
| ac | h | 8 |
| aa | i | 9 |
| ac | j | 10 |
| ac | k | 11 |
| ac | l | 12 |
| ac | m | 13 |
| ac | n | 14 |
| | o | 15 |
| | p | 16 |
| ac | q | 17 |
| ac | r | 18 |
| aa | s | 19 |
| | t | 20 |
| | u | 21 |
| | v | 22 |
| | w | 23 |
| | x | 24 |
What I'm trying to get in the output is if the count of group is less than 9 , I'll assign the unassigned roll_no in ascending order to those groups.
This is how the output be like:
| Group | class | roll_no |
| aa | a | 1 |
| aa | b | 2 |
| aa | c | 3 |
| aa | d | 4 |
| aa | e | 5 |
| aa | f | 6 |
| aa | g | 7 |
| ac | h | 8 |
| aa | i | 9 |
| ac | j | 10 |
| ac | k | 11 |
| ac | l | 12 |
| ac | m | 13 |
| ac | n | 14 |
| aa | o | 15 |
| ac | p | 16 |
| ac | q | 17 |
| ac | r | 18 |
| | s | 19 |
| | t | 20 |
| | u | 21 |
| | v | 22 |
| | w | 23 |
| | x | 24 |
As I'm still a new learner ,this solution would be of great help ,Thanks in advance 🙂