Moetera cont 10
Updated 2022-12-21
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
›
⌄
-- with base as (select ADDRESS,label from
-- terra.core.dim_address_labels
-- where
-- LABEL_TYPe ilike '%token%' and LABEL in ( 'USDT' ,'usdc', 'UST' , 'ust' ) )
SELECT
date_trunc(week,block_timestamp)::date as week ,
transfer_type, sum(amount/1e6) as amounts,
count(distinct sender) as senders,
count(distinct RECEIVER) as RECEIVERs,
sum(amounts) over (partition by transfer_type order by week rows between unbounded preceding and current row) as cum_amount,
sum(senders) over (partition by transfer_type order by week rows between unbounded preceding and current row) as cum_senders
from terra.core.ez_transfers
where currency in (
'ibc/B3504E092456BA618CC28AC671A71FB08C6CA0FD0BE7C8A5B5A3E2DD933CC9E4',
'ibc/CBF67A2BCF6CAE343FDF251E510C8E18C361FC02B23430C121116E0811835DEF'
)
group by week,transfer_type
Run a query to Download Data