I have a table like this (significantly simplified):
|student_id|Courses| grades |
+----------+-------+--------+
| 001 | Math | 95 |
| 001 | Math | 83 |
| 001 | Others| 33 |
| 002 | Math | 92 |
| 002 | Others| 12 |
| 002 | Others| 72 |
What I want:
- Count of 'Math'
- Minimum of 'Others'
- Grouped by student_id
Desired outcome:
|student_id|Num_math|min_others|
+----------+--------+----------+
| 001 | 2 | 33 |
| 002 | 1 | 12 |