misaghlbBridger Destinations - from optimism to ethereum
Updated 2022-09-13
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
›
⌄
select
date_trunc('month', block_timestamp) as date,
CASE
when contract_address = '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48' then 'USDC'
when contract_address = '0xdac17f958d2ee523a2206206994597c13d831ec7' then 'USDT'
when contract_address = '0x6b175474e89094c44da98b954eedeac495271d0f' then 'DAI'
when contract_address = '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599' then 'WBTC' end as name,
count (DISTINCT tx_hash) tx_count,
count (DISTINCT ORIGIN_FROM_ADDRESS ) wallets,
sum (amount_usd) as usd_vol,
sum (amount) as vol,
sum(usd_vol) over (partition by name order by date) as cumu_usd_vol
from ethereum.core.ez_token_transfers
where origin_to_address ='0x25ace71c97b33cc4729cf772ae268934f7ab5fa1'
group by date, name HAVING name is not NULL
UNION
select
date_trunc('month', block_timestamp) as date,
'ETH' as name,
count (DISTINCT tx_hash) tx_count,
count (DISTINCT ORIGIN_FROM_ADDRESS ) wallets,
sum (amount_usd) as usd_vol,
sum (amount) as vol,
sum(usd_vol) over (partition by name order by date) as cumu_usd_vol
from ethereum.core.ez_eth_transfers
where origin_to_address = '0x25ace71c97b33cc4729cf772ae268934f7ab5fa1'
group by date, name
Run a query to Download Data