Ali3NTop 5 Optimism to Ethereum Tokens (Volume of Bridges)
    Updated 2022-11-04
    with ETHTable as (
    select 'ETH' as symbol,
    count (distinct tx_hash) as TX_Count,
    count (distinct origin_from_address) as Users_Count,
    sum (amount_usd) as USD_Volume,
    sum (amount) as Volume
    from ethereum.core.ez_eth_transfers
    where origin_to_address = '0x25ace71c97b33cc4729cf772ae268934f7ab5fa1'
    and block_timestamp >= '2022-07-01' and block_timestamp < '2022-08-01'),
    TokenTable as (
    select symbol,
    count (distinct tx_hash) as TX_Count,
    count (distinct origin_from_address) as Users_Count,
    sum (amount_usd) as USD_Volume,
    sum (amount) as Volume
    from ethereum.core.ez_token_transfers
    where origin_to_address = '0x25ace71c97b33cc4729cf772ae268934f7ab5fa1'
    and block_timestamp >= '2022-07-01' and block_timestamp < '2022-08-01'
    group by 1)

    select * from ethtable union all select * from tokentable
    where usd_volume > 0
    order by USD_Volume DESC
    limit 5
    Run a query to Download Data