RamaharWho's That Going Across My Bridge (Redux) Osmosis
Updated 2022-04-20Copy 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
›
⌄
with inflow as (select
DATE(block_timestamp) AS dayz,
count (distinct tx_id) as NoOfInFlowTransactions,
count(distinct recipient) as NoOfInFlowUsers,
sum(amount) as USTInFlowamount,
sum(USTInFlowamount) over (order by dayz asc rows between unbounded preceding and current row) as accumulatedInFlowUST
from terra.transfer_events
where sender = 'terra1kq2rzz6fq2q7fsu75a9g7cpzjeanmk68wplle5'
and currency = 'UST'
group by 1 ),
outflow as (select
DATE(block_timestamp) AS dt,
count (distinct tx_id) as NoOfOutFlowTransactions,
count(distinct sender) as NoOfOutFlowUsers,
sum(amount) as USTOutFlowamount,
sum(USTOutFlowamount) over (order by dt asc rows between unbounded preceding and current row) as accumulatedOutFlowUST
from terra.transfer_events
where recipient = 'terra1kq2rzz6fq2q7fsu75a9g7cpzjeanmk68wplle5'
and currency = 'UST'
group by 1)
select
dayz,
NoOfInFlowTransactions,
NoOfInFlowUsers,
USTInFlowamount,
accumulatedInFlowUST,
NoOfOutFlowTransactions,
NoOfOutFlowUsers,
USTOutFlowamount,
accumulatedOutFlowUST
from inflow
left join outflow ON dayz=dt
Run a query to Download Data