回答編集履歴
2
chousei
test
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
|
19
19
|
(5,140,10);
|
20
20
|
|
21
|
-
select id,sum(a+b) as total from tbl group by id with rollup;
|
21
|
+
select id,sum(a+b) as total from tbl group by id asc with rollup;
|
22
22
|
|
23
23
|
```
|
24
24
|
|
1
chousei
test
CHANGED
@@ -21,3 +21,23 @@
|
|
21
21
|
select id,sum(a+b) as total from tbl group by id with rollup;
|
22
22
|
|
23
23
|
```
|
24
|
+
|
25
|
+
- 結果
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
|id|total|
|
30
|
+
|
31
|
+
|--:|--:|
|
32
|
+
|
33
|
+
|1|130|
|
34
|
+
|
35
|
+
|2|130|
|
36
|
+
|
37
|
+
|3|170|
|
38
|
+
|
39
|
+
|4|140|
|
40
|
+
|
41
|
+
|5|150|
|
42
|
+
|
43
|
+
|NULL|720|
|