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