@@ -30,29 +30,29 @@ The result format is in the following example.
30
30
31
31
Scores table:
32
32
33
- +------------+----------+-------+------------+
34
- | student_id | subject | score | exam_date |
35
- +------------+----------+-------+------------+
36
- | 101 | Math | 70 | 15-01-2023 |
37
- | 101 | Math | 85 | 15-02-2023 |
38
- | 101 | Physics | 65 | 15-01-2023 |
39
- | 101 | Physics | 60 | 15-02-2023 |
40
- | 102 | Math | 80 | 15-01-2023 |
41
- | 102 | Math | 85 | 15-02-2023 |
42
- | 103 | Math | 90 | 15-01-2023 |
43
- | 104 | Physics | 75 | 15-01-2023 |
44
- | 104 | Physics | 85 | 15-02-2023 |
45
- +------------+----------+-------+------------+
33
+ +------------+----------+-------+------------+
34
+ | student_id | subject | score | exam_date |
35
+ +------------+----------+-------+------------+
36
+ | 101 | Math | 70 | 15-01-2023 |
37
+ | 101 | Math | 85 | 15-02-2023 |
38
+ | 101 | Physics | 65 | 15-01-2023 |
39
+ | 101 | Physics | 60 | 15-02-2023 |
40
+ | 102 | Math | 80 | 15-01-2023 |
41
+ | 102 | Math | 85 | 15-02-2023 |
42
+ | 103 | Math | 90 | 15-01-2023 |
43
+ | 104 | Physics | 75 | 15-01-2023 |
44
+ | 104 | Physics | 85 | 15-02-2023 |
45
+ +------------+----------+-------+------------+
46
46
47
47
** Output:**
48
48
49
- +------------+----------+-------------+--------------+
50
- | student_id | subject | first_score | latest_score |
51
- +------------+----------+-------------+--------------+
52
- | 101 | Math | 70 | 85 |
53
- | 102 | Math | 80 | 85 |
54
- | 104 | Physics | 75 | 85 |
55
- +------------+----------+-------------+--------------+
49
+ +------------+----------+-------------+--------------+
50
+ | student_id | subject | first_score | latest_score |
51
+ +------------+----------+-------------+--------------+
52
+ | 101 | Math | 70 | 85 |
53
+ | 102 | Math | 80 | 85 |
54
+ | 104 | Physics | 75 | 85 |
55
+ +------------+----------+-------------+--------------+
56
56
57
57
** Explanation:**
58
58
0 commit comments