数か月後...すべての合計を取得できますが、それだけです。
CREATE TABLE combos
(ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY
,REL_ID INT NOT NULL
,E INT NOT NULL
);
INSERT INTO combos VALUES
(1,1,10),
(2,1,30),
(3,1,8),
(4,1,42),
(5,1,57);
SELECT DISTINCT n1.e
+ CASE WHEN n2.id IN(n1.id) THEN 0 ELSE n2.e END
+ CASE WHEN n3.id IN(n2.id,n1.id) THEN 0 ELSE n3.e END
+ CASE WHEN n4.id IN(n3.id,n2.id,n1.id) THEN 0 ELSE n4.e END
+ CASE WHEN n5.id IN(n4.id,n3.id,n2.id,n1.id) THEN 0 ELSE n5.e END x
FROM combos n1
JOIN combos n2
ON n2.id <= n1.id
JOIN combos n3
ON n3.id <= n2.id
JOIN combos n4
ON n4.id <= n3.id
JOIN combos n5
ON n5.id <= n3.id
ORDER
BY x;
+-----+
| x |
+-----+
| 8 |
| 10 |
| 18 |
| 30 |
| 38 |
| 40 |
| 42 |
| 48 |
| 50 |
| 52 |
| 57 |
| 60 |
| 65 |
| 67 |
| 72 |
| 75 |
| 80 |
| 82 |
| 87 |
| 95 |
| 97 |
| 99 |
| 107 |
| 109 |
| 129 |
+-----+
25 rows in set (0.00 sec)