回答編集履歴
2
修正
answer
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
select * from tbl t
|
13
13
|
where not exists(
|
14
14
|
select 1 from tbl
|
15
|
-
where key1
|
15
|
+
where key1 like substr(t.key1, 1, 2) || '%'
|
16
16
|
and array[key1, key2, key3]::text[] > array[t.key1, t.key2, t.key3]::text[]
|
17
17
|
)
|
18
18
|
```
|
1
訂正
answer
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
select * from tbl t
|
13
13
|
where not exists(
|
14
14
|
select 1 from tbl
|
15
|
-
where
|
15
|
+
where key1 = like substr(t.key1, 1, 2) || '%'
|
16
16
|
and array[key1, key2, key3]::text[] > array[t.key1, t.key2, t.key3]::text[]
|
17
17
|
)
|
18
18
|
```
|