回答編集履歴
1
調整
test
CHANGED
@@ -1,11 +1,15 @@
|
|
1
1
|
```SQL
|
2
2
|
|
3
|
-
select min(
|
3
|
+
select min(id) from tbl
|
4
4
|
|
5
|
-
|
5
|
+
where item_id=(
|
6
6
|
|
7
|
-
|
7
|
+
select item_id from tbl as t1
|
8
8
|
|
9
|
-
|
9
|
+
where not exists (select 1 from tbl where id>t1.id)
|
10
|
+
|
11
|
+
)
|
10
12
|
|
11
13
|
```
|
14
|
+
|
15
|
+
※最新idも自動取得でしたね・・・
|