質問編集履歴
1
PL/SQLの削除、テーブル構成を表からCREATE・INSERT文に変更しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -6,31 +6,45 @@
|
|
6
6
|
|
7
7
|
|
8
8
|
|
9
|
-
【テーブル
|
9
|
+
【テーブル構成】
|
10
10
|
|
11
|
-
|
11
|
+
```ここに言語を入力
|
12
12
|
|
13
|
-
|
13
|
+
create table sample_log (
|
14
14
|
|
15
|
-
|
15
|
+
key_id integer not null,
|
16
16
|
|
17
|
-
|
17
|
+
time timestamp(6) with time zone not null,
|
18
18
|
|
19
|
-
|
19
|
+
value numeric,
|
20
20
|
|
21
|
-
|
21
|
+
primary key (mid,sampled_at)
|
22
22
|
|
23
|
-
|
23
|
+
);
|
24
|
-
|
25
|
-
|2|2020/3/1 10:01:14|26|
|
26
|
-
|
27
|
-
|3|2020/3/1 10:01:12|24|
|
28
|
-
|
29
|
-
|3|2020/3/1 10:01:13|25|
|
30
|
-
|
31
|
-
|3|2020/3/1 10:01:14|26|
|
32
24
|
|
33
25
|
|
26
|
+
|
27
|
+
INSERT INTO sample_log VALUES(1,'2020/3/1 10:01:12',24));
|
28
|
+
|
29
|
+
INSERT INTO sample_log VALUES(1,'2020/3/1 10:01:13',25));
|
30
|
+
|
31
|
+
INSERT INTO sample_log VALUES(1,'2020/3/1 10:01:14',26));
|
32
|
+
|
33
|
+
INSERT INTO sample_log VALUES(2,'2020/3/1 10:01:12',24));
|
34
|
+
|
35
|
+
INSERT INTO sample_log VALUES(2,'2020/3/1 10:01:13',25));
|
36
|
+
|
37
|
+
INSERT INTO sample_log VALUES(2,'2020/3/1 10:01:14',26));
|
38
|
+
|
39
|
+
INSERT INTO sample_log VALUES(3,'2020/3/1 10:01:12',24));
|
40
|
+
|
41
|
+
INSERT INTO sample_log VALUES(3,'2020/3/1 10:01:13',25));
|
42
|
+
|
43
|
+
INSERT INTO sample_log VALUES(3,'2020/3/1 10:01:14',26));
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
```
|
34
48
|
|
35
49
|
【期待結果】
|
36
50
|
|