mattkstew3-7-1
Updated 2021-08-03Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
with anch as (
select
date_trunc('day', date) as t,
AVG(balance_usd) as anch
from terra.daily_balances
where address like 'terra1sepfj7s0aeg5967uxnfk4thzlerrsktkpelm5s'
and currency like 'UST'
and date > current_date - 14
group by 1
), mir as (
select
date_trunc('day', date) as t,
AVG(balance_usd) as mir
from terra.daily_balances
where address like 'terra1wfz7h3aqf4cjmjcvc6s8lxdhh7k30nkczyf0mj'
-- and currency like 'UST'
and date > current_date - 14
group by 1
)
SELECT *
from mir join anch on mir.t = anch.t
Run a query to Download Data