質問編集履歴
4
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -14,13 +14,13 @@
|
|
14
14
|
|
15
15
|
create table user (id BIGINT(20), t BIGINT(20));
|
16
16
|
|
17
|
-
insert into user values (20226, 15716
|
17
|
+
insert into user values (20226, 1571632622304);
|
18
18
|
|
19
19
|
|
20
20
|
|
21
21
|
create table user_b (id BIGINT(20), t BIGINT(20));
|
22
22
|
|
23
|
-
insert into user_b values (25726, 15691
|
23
|
+
insert into user_b values (25726, 1569201884438);
|
24
24
|
|
25
25
|
|
26
26
|
|
@@ -40,7 +40,7 @@
|
|
40
40
|
|
41
41
|
from_unixtime(truncate(a.t,-3)/1000) as a_time,
|
42
42
|
|
43
|
-
from_unixtime(truncate(b.t,-3)/1000) as b_time
|
43
|
+
from_unixtime(truncate(b.t,-3)/1000) as b_time
|
44
44
|
|
45
45
|
|
46
46
|
|
3
更新
test
CHANGED
File without changes
|
test
CHANGED
@@ -14,13 +14,13 @@
|
|
14
14
|
|
15
15
|
create table user (id BIGINT(20), t BIGINT(20));
|
16
16
|
|
17
|
-
insert into user values (20226, 15
|
17
|
+
insert into user values (20226, 1571600222);
|
18
18
|
|
19
19
|
|
20
20
|
|
21
21
|
create table user_b (id BIGINT(20), t BIGINT(20));
|
22
22
|
|
23
|
-
insert into user_b values (25726, 156
|
23
|
+
insert into user_b values (25726, 1569169484 );
|
24
24
|
|
25
25
|
|
26
26
|
|
2
更新
test
CHANGED
File without changes
|
test
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
|
12
12
|
|
13
|
-
```sql
|
13
|
+
```sql
|
14
14
|
|
15
15
|
create table user (id BIGINT(20), t BIGINT(20));
|
16
16
|
|
1
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -3,6 +3,28 @@
|
|
3
3
|
WHERE句内で「値=最大値」を取得したい
|
4
4
|
|
5
5
|
(調査する期間を絞った中での最大値に絞りたい)
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
##データ構造
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
```sql
|
14
|
+
|
15
|
+
create table user (id BIGINT(20), t BIGINT(20));
|
16
|
+
|
17
|
+
insert into user values (20226, 1564466076000);
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
create table user_b (id BIGINT(20), t BIGINT(20));
|
22
|
+
|
23
|
+
insert into user_b values (25726, 1562221548143);
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
```
|
6
28
|
|
7
29
|
|
8
30
|
|