I have let's say I have rows in the following order:
| SN | name1 | grade1 | name2 | grade2 | name3 | grade3 |
|---|---|---|---|---|---|---|
| 1 | Alice | 97 | Bob | 90 | Carl | 80 |
| 2 | Bob | 80 | Alice | 100 | Carl | 95 |
| 3 | Alice | 100 | Carl | 80 | Bob | 90 |
Is there a way to keep the rows ordered 1 - 2 - 3, but alphabetize the columns by the student's names, while keeping the grade associated with each student?
Meaning, all rows will be in the format
SN | Alice | grade1 | Bob | grade2 | Carl | grade3 |