+------+------------+----------+--------+
| id | course | std_id | marks |
+------+------------+----------+--------+
| 1 | 1 | 1 | 9 |
| 2 | 2 | 2 | 5 |
| 3 | 1 | 3 | 5 |
| 4 | 1 | 1 | 6 |
| 5 | 2 | 1 | 4 |
+------+------------+----------+--------+
+----------------+----------------+
| course | credit |
+----------------+----------------+
| 1 | 5 |
| 2 | 5 |
+----------------+----------------+
個別のコースの学生のマークとクレジットの合計を降順で取得する必要があります
お気に入り:
+---------+------------+-------+
|std_id | sum(marks)| sum()|
+---------+------------+-------+
| 1 | 10 | 10 |
| 2 | 5 | 5 |
| 3 | 5 | 5 |
+---------+------------+-------+