5. A school conducted a math test for all students in Group 1 and Group 2 of Grade 8, with 10 students in each group. The median scores of Group 1 and Group 2 are 95 points and 97 points, respectively. If a score of 96 points or higher is considered excellent, then the number of excellent students in Group 1 and Group 2 are $m$ and $n$, respectively. Therefore, the relationship between $m$ and $n$ is ( ).
(A) $mn$
(C) $m=n \quad \begin{array}{l}\text { (C }\end{array}$
(D) $m \leqslant n$
5.D.

Since the median score of 10 students in Group 1 is 95 points, the number of students in Group 1 with scores higher than 95 points does not exceed 5. Therefore, the number of students in Group 1 with scores greater than or equal to 96 points does not exceed 5, i.e., $m \leqslant 5$. Since the median score of 10 students in Group 2 is 97 points, the number of students in Group 2 with scores greater than or equal to 97 points is no less than 5. Therefore, the number of students in Group 2 with scores greater than or equal to 96 points is no less than 5, i.e., $n \geqslant 5$.
Hence, $m \leqslant n$.
For example, the scores in Group 1 are $94,94,94,94,94,96,99$, $99,99,99$; the scores in Group 2 are $94,94,94,94,95,99$, $99,99,99,99$. In this case, $m=n$.