回答編集履歴
2
補正
test
CHANGED
@@ -20,7 +20,11 @@
|
|
20
20
|
|
21
21
|
select *
|
22
22
|
|
23
|
-
|
23
|
+
, case when row_number() over(partition by id order by name)=1
|
24
|
+
|
25
|
+
then True else false
|
26
|
+
|
27
|
+
end as flag
|
24
28
|
|
25
29
|
from テーブル
|
26
30
|
|
1
追記
test
CHANGED
@@ -9,3 +9,19 @@
|
|
9
9
|
from テーブル
|
10
10
|
|
11
11
|
```
|
12
|
+
|
13
|
+
追記
|
14
|
+
|
15
|
+
--
|
16
|
+
|
17
|
+
勘違いしていましたので、訂正。
|
18
|
+
|
19
|
+
```SQL
|
20
|
+
|
21
|
+
select *
|
22
|
+
|
23
|
+
, case when row_number() over(partition by id order by name)=1 then True else false end as flag
|
24
|
+
|
25
|
+
from テーブル
|
26
|
+
|
27
|
+
```
|