hessTo Avalanche copy
Updated 2023-07-19
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 chain as ( select 'Arbitrum' as chain, block_timestamp, tx_hash , to_address as user, amount
from arbitrum.core.ez_token_transfers
where from_address = '0x0000000000000000000000000000000000000000'
and contract_address = lower('0x371c7ec6d8039ff7933a2aa28eb827ffe1f52f07')
and to_address not in ('0x5d3e4c0fe11e0ae4c32f0ff74b4544c49538ac61',
'0x86355f02119bdbc28ed6a4d5e0ca327ca7730fff',
'0x2ef002aa0ab6761b6aea8d639dcdaa20d79b768c')
and tx_hash in (select tx_hash
from arbitrum.core.fact_decoded_event_logs
where DECODED_LOG:"_dstChainId" = '106')
and block_timestamp::date >= '2023-01-01'
UNION
select 'BSC' chain , block_timestamp, tx_hash , to_address as user, amount
from bsc.core.ez_token_transfers
where from_address = '0x0000000000000000000000000000000000000000'
and contract_address = lower('0x371c7ec6d8039ff7933a2aa28eb827ffe1f52f07')
and to_address not in ('0x5d3e4c0fe11e0ae4c32f0ff74b4544c49538ac61',
'0x86355f02119bdbc28ed6a4d5e0ca327ca7730fff',
'0x2ef002aa0ab6761b6aea8d639dcdaa20d79b768c')
and tx_hash in (select tx_hash
from bsc.core.fact_decoded_event_logs
where DECODED_LOG:"_dstChainId" = '106')
and block_timestamp::date >= '2023-01-01')
select trunc(block_timestamp,'week') as weekly, chain, count(DISTINCT(tx_hash)) as tx,
sum(tx) over (order by weekly asc) as cum_tx,
count(DISTINCT(user)) as users, sum(amount) as amount,
avg(amount) as avg_amount
from chain
group by 1,2
Run a query to Download Data