Loading problem...
An education analytics team wants to identify students whose performance is stable across tests.
Table: student
Table: exam
Definition: A student is considered consistently mid-range when both conditions hold:
Important scoring semantics:
Task: Return all students who satisfy this definition.
Output requirements:
Supported submission environments:
student:
| student_id | student_name |
|------------|--------------|
| 1 | Daniel |
| 2 | Jade |
| 3 | Stella |
| 4 | Jonathan |
| 5 | Will |
exam:
| exam_id | student_id | score |
|---------|------------|-------|
| 10 | 1 | 70 |
| 10 | 2 | 80 |
| 10 | 3 | 90 |
| 20 | 1 | 80 |
| 30 | 1 | 70 |
| 30 | 3 | 80 |
| 30 | 4 | 90 |
| 40 | 1 | 60 |
| 40 | 2 | 70 |
| 40 | 4 | 80 |[
{"student_id":2,"student_name":"Jade"}
]Student 2 appears in exams and is never tied to a local minimum or maximum score. Student 5 is excluded because they did not take any exam.
student:
| student_id | student_name |
|------------|--------------|
| 10 | Aster |
| 11 | Blair |
| 12 | Casey |
exam:
| exam_id | student_id | score |
|---------|------------|-------|
| 100 | 10 | 50 |
| 100 | 11 | 50 |
| 100 | 12 | 50 |
| 101 | 10 | 90 |
| 101 | 11 | 40 |[]In exam 100, everyone is both min and max because all scores tie. In exam 101, one student is max and one is min. No student remains non-extreme in all taken exams.
student:
| student_id | student_name |
|------------|--------------|
| 21 | Noor |
| 22 | Priya |
| 23 | Sam |
| 24 | Theo |
exam:
| exam_id | student_id | score |
|---------|------------|-------|
| 201 | 21 | 50 |
| 201 | 22 | 68 |
| 201 | 23 | 74 |
| 201 | 24 | 92 |
| 202 | 21 | 52 |
| 202 | 22 | 69 |
| 202 | 23 | 75 |
| 202 | 24 | 94 |
| 203 | 21 | 53 |
| 203 | 22 | 70 |
| 203 | 23 | 76 |
| 203 | 24 | 95 |[
{"student_id":22,"student_name":"Priya"},
{"student_id":23,"student_name":"Sam"}
]Students 22 and 23 are always internal scores in every exam they take. Students 21 and 24 hit extreme positions.
Constraints