MLDZMNstba7
Updated 2023-03-07
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
›
⌄
with tb2 as (
select
BLOCK_TIMESTAMP,
FROM_ADDRESS,
ORIGIN_FROM_ADDRESS,
TO_ADDRESS,
tx_hash,
RAW_AMOUNT/POWER(10, 6) as amount
from arbitrum.core.fact_token_transfers
WHERE contract_address = '0xff970a61a04b1ca14834a43f5de4533ebddb5cc8'
order by 1
)
select
date_trunc('day',BLOCK_TIMESTAMP) as date,
LABEL_TYPE,
count(distinct ORIGIN_FROM_ADDRESS) as users,
count(distinct tx_hash) as count_txn,
sum(amount) as volume,
-- sum(users) over (partition by LABEL_TYPE order by day) as cum_users,
sum(volume) over (partition by LABEL_TYPE order by date) as cum_txn
from tb2 q join arbitrum.core.dim_labels w on q.TO_ADDRESS= w.address
where LABEL_TYPE not in ('chadmin','operator','token')
and BLOCK_TIMESTAMP>='2023-01-01'
group by 1,2
Run a query to Download Data