Skip to content

Commit 2130ef3

Browse files
author
Herfort
committed
Merge branch 'benni.new-project-types' of https://github.com/mapswipe/python-mapswipe-workers into benni.new-project-types
2 parents 3c07b55 + c2f483e commit 2130ef3

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

scripts/import_results_diff.sql

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
-- to get the latest reults from mysql into
2+
-- the materialized or cached view, we need to refresh it
3+
4+
refresh materialized view msql_results;
5+
6+
-- insert missing results
7+
insert into public.results
8+
select
9+
a.*
10+
from
11+
msql_results a
12+
where
13+
a."timestamp" > (select
14+
b."timestamp"
15+
from
16+
results b
17+
order by
18+
b."timestamp" desc
19+
limit
20+
1);
21+
22+
--##################################################
23+
--18-146471-122005 1550058728756
24+
-- latest timestamp
25+
select
26+
to_timestamp(1550058728.756);
27+
28+
29+
--18-123094-124719 1468582484160
30+
-- first timestamp
31+
select
32+
to_timestamp(1468582484.160);

0 commit comments

Comments
 (0)