Moe1 xcxcxcxc
Updated 2022-11-23
999
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 base as (select
'Ethereum' as chain ,
date_trunc({{scale}},BLOCK_TIMESTAMP) as date ,
count(distinct tx_hash) as txns,
sum(txns)over(order by date ) as cum_txns,
count(distinct FROM_ADDRESS) as senders,
sum(senders)over(order by date ) as cum_senders,
count(distinct TO_ADDRESS) as receivers,
sum(receivers)over(order by date ) as cum_receivers,
sum(AMOUNT_USD) as trs_amnt,
sum(trs_amnt) over(order by date ) as cum_amount,
avg(AMOUNT_USD) as avg_amount,
median(AMOUNT_USD) as median_amount
from
ethereum.core.ez_token_transfers
where
SYMBOL ilike 'usdc'
and
BLOCK_TIMESTAMP::date >= CURRENT_DATE - {{days_back}}
group by date
union all
select
'Algorand' as chain ,
date_trunc({{scale}},BLOCK_TIMESTAMP) as date ,
count(distinct tx_id) as txns,
sum(txns)over(order by date ) as cum_txns,
count(distinct ASSET_SENDER) as senders,
sum(senders)over(order by date ) as cum_senders,
count(distinct receiver) as receivers,
sum(receivers)over(order by date ) as cum_receivers,
sum(amount) as trs_amnt,
sum(trs_amnt) over(order by date ) as cum_amount,
avg(amount) as avg_amount,
Run a query to Download Data