berta03 stable coins_total
Updated 2022-11-03Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
›
⌄
with ETHEREUM_TO_OPTIMISM as (select symbol, count (DISTINCT origin_from_address) as number_of_users,
count (distinct tx_hash) as number_of_transactions, ifnull((sum(amount_usd)),0) as volume, 'Ethereum_to_Optimism' as type_of_bridge
from ethereum.core.ez_token_transfers
where symbol in ('USDC', 'USDT', 'LUSD') and block_timestamp >= '2022-01-01' and block_timestamp <= CURRENT_DATE - 1 and
to_address ilike '0x99c9fc46f92e8a1c0dec1b1747d010903e884be1'
group by 1),
OPTIMISM_TO_ETHEREUM as (select symbol,
count (distinct origin_from_address) as number_of_users, count (distinct tx_hash) as number_of_transactions,
ifnull((sum(amount_usd)),0) as volume, 'Optimism_to_Ethereum' as type_of_bridge
from ethereum.core.ez_token_transfers
where symbol in ('USDC', 'USDT', 'LUSD') and block_timestamp >= '2022-01-01' and block_timestamp <= CURRENT_DATE - 1 and
origin_to_address ilike '0x25ace71c97b33cc4729cf772ae268934f7ab5fa1' group by 1)
(select * from ETHEREUM_TO_OPTIMISM)
union all
(select * from OPTIMISM_TO_ETHEREUM)
Run a query to Download Data