回答編集履歴

1

修正

2016/03/08 14:09

投稿

hirohiro
hirohiro

スコア2068

test CHANGED
@@ -2,13 +2,13 @@
2
2
 
3
3
  ```SQL
4
4
 
5
- SELECT group
5
+ SELECT t.group
6
6
 
7
- , path AS root_path
7
+ , t.path AS root_path
8
8
 
9
- , size AS root_size
9
+ , t.size AS root_size
10
10
 
11
- , allSize - size AS size_sum
11
+ , s.allSize - t.size AS size_sum
12
12
 
13
13
  FROM table t
14
14
 
@@ -22,6 +22,6 @@
22
22
 
23
23
  ) s ON t.group = s.group
24
24
 
25
- WHERE path_hierarchy = 0
25
+ WHERE t.path_hierarchy = 0
26
26
 
27
27
  ```