Loading content...
An academic analytics team wants to identify student-subject combinations with measurable score progress over time.
Table: Scores
Each row records one student's score for one subject on one date. (student_id, subject, exam_date) is unique.
Task: For each (student_id, subject), compute:
Keep only pairs that satisfy both conditions:
Output requirements:
Supported submission environments:
Scores:
| student_id | subject | score | exam_date |
|------------|---------|-------|------------|
| 101 | Math | 70 | 2023-01-15 |
| 101 | Math | 85 | 2023-02-15 |
| 101 | Physics | 65 | 2023-01-15 |
| 101 | Physics | 60 | 2023-02-15 |
| 102 | Math | 80 | 2023-01-15 |
| 102 | Math | 85 | 2023-02-15 |
| 103 | Math | 90 | 2023-01-15 |
| 104 | Physics | 75 | 2023-01-15 |
| 104 | Physics | 85 | 2023-02-15 |[
{"student_id":101,"subject":"Math","first_score":70,"latest_score":85},
{"student_id":102,"subject":"Math","first_score":80,"latest_score":85},
{"student_id":104,"subject":"Physics","first_score":75,"latest_score":85}
]Only subject tracks with at least two attempts and strict first-to-latest improvement are returned.
Scores:
| student_id | subject | score | exam_date |
|------------|-----------|-------|------------|
| 210 | Biology | 55 | 2024-01-10 |
| 210 | Biology | 55 | 2024-03-10 |
| 210 | Chemistry | 60 | 2024-01-10 |
| 210 | Chemistry | 74 | 2024-02-20 |
| 210 | Chemistry | 68 | 2024-04-05 |[
{"student_id":210,"subject":"Chemistry","first_score":60,"latest_score":68}
]Biology is excluded because the latest score is not greater than the first score. Intermediate peaks do not matter; only first and latest are compared.
Scores:
| student_id | subject | score | exam_date |
|------------|---------|-------|------------|
| 501 | History | 88 | 2023-05-01 |
| 501 | History | 91 | 2023-02-01 |
| 501 | History | 90 | 2023-08-01 |
| 502 | History | 40 | 2023-01-01 |
| 502 | History | 45 | 2023-09-01 |[
{"student_id":502,"subject":"History","first_score":40,"latest_score":45}
]Rows can arrive unsorted. first_score and latest_score must be computed by exam_date, not by input order.
Constraints