Credits each student is carrying
Your task
Total the credits each enrolled student is taking. Return name and credits, most first, then alphabetically.
Tables
student
| idINTEGER | nameTEXT | yearINTEGER |
|---|---|---|
| 1 | Tam | 1 |
| 2 | Uli | 2 |
| 3 | Vic | 2 |
| 4 | Wren | 3 |
course
| idINTEGER | titleTEXT | creditsINTEGER |
|---|---|---|
| 1 | Databases | 4 |
| 2 | Networks | 3 |
| 3 | Compilers | 4 |
| 4 | Ethics | 2 |
enrolment
More rows not shown
| student_idINTEGER | course_idINTEGER | gradeINTEGER |
|---|---|---|
| 1 | 1 | 88 |
| 1 | 2 | 72 |
| 2 | 1 | 91 |
| 2 | 3 | 64 |
| 3 | 1 | 91 |
| 3 | 2 | 55 |