回答編集履歴
1
追記
answer
CHANGED
@@ -4,4 +4,13 @@
|
|
4
4
|
where not exists(
|
5
5
|
select 1 from test where 列3=t1.列3 and ID < t1.ID
|
6
6
|
)
|
7
|
-
```
|
7
|
+
```
|
8
|
+
または
|
9
|
+
```SQL
|
10
|
+
select t1.*
|
11
|
+
from test t1 inner join (
|
12
|
+
select 列3, min(id) as min_id from test group by 列3
|
13
|
+
) t2
|
14
|
+
on t1.列3=t2.列3 and t1.ID=t2.min_id
|
15
|
+
```
|
16
|
+
記述としては他にもありますけど、性能に差がでそうなものを取りあえずパターンとして
|