MasiActivities with BTC
Updated 2023-03-15Copy Reference Fork
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
›
⌄
--Based on available data which axelar is not avaiable
with tb1 as ( select label as label_type,
'Ethereum' as chain,
count(DISTINCT tx_hash) as count_tx,
count(DISTINCT origin_from_address) as count_user,
sum(raw_amount/pow(10,8)) as amount,
avg(raw_amount/pow(10,8)) as avg_amount
from ethereum.core.sv_fact_token_transfers a join ethereum.core.dim_labels b on a.origin_to_address = b.address
where contract_address = lower('0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599')
and block_timestamp >= CURRENT_DATE - 180
group by 1,2
order by 5 desc
limit 10 )
,
tb2 as ( select label_type,
'Avalanche' as chain,
count(DISTINCT tx_hash) as count_tx,
count(DISTINCT origin_from_address) as count_user,
sum(raw_amount/pow(10,8)) as amount,
avg(raw_amount/pow(10,8)) as avg_amount
from avalanche.core.fact_token_transfers a join avalanche.core.dim_labels b on a.origin_to_address = b.address
where contract_address in (lower('0x152b9d0FdC40C096757F570A51E494bd4b943E50'),lower('0x50b7545627a5162F82A992c33b87aDc75187B218'))
and block_timestamp >= CURRENT_DATE - 180
group by 1,2
order by 5 desc
)
,
tb3 as (select label_type,
'Optimism' as chain,
count(DISTINCT tx_hash) as count_tx,
count(DISTINCT origin_from_address) as count_user,
sum(raw_amount/pow(10,8)) as amount,
avg(raw_amount/pow(10,8)) as avg_amount
from optimism.core.fact_token_transfers a join optimism.core.dim_labels b on a.origin_to_address = b.address
where contract_address = lower('0x68f180fcCe6836688e9084f035309E29Bf0A2095')
and block_timestamp >= CURRENT_DATE - 180
Run a query to Download Data