0xHaM-dDaily Transferred Volume over the past 30 days
    Updated 2022-08-11
    with tx as (
    select
    date(BLOCK_TIMESTAMP) as date,
    tx_hash,
    from_address ,
    to_address,
    substring(INPUT_DATA, 202, 1) as chain_id,
    ORIGIN_FUNCTION_SIGNATURE
    from ethereum.core.fact_transactions
    where block_timestamp::date >= CURRENT_DATE - 30
    and status = 'SUCCESS'
    )
    ,sol_eth as (
    select tx_hash
    from tx
    where to_address = lower('0x3ee18b2214aff97000d974cf647e7c347e8fa585')
    and origin_function_signature = '0xc6878519'
    and chain_id = '1'
    ),
    eth_sol as (
    select tx_hash
    from tx
    where to_address = lower('0x3ee18b2214aff97000d974cf647e7c347e8fa585')
    and origin_function_signature in ( '0x0f5287b0','0x9981509f')
    and chain_id = '1'
    )
    ,
    tb1 as (
    select 'Sol to ETH Bridge' as type,
    BLOCK_TIMESTAMP::date as date,
    count(DISTINCT(tx_hash)) as tx ,
    sum(amount_usd) as volume,
    sum(volume) over (order by date asc) as cum_vol
    from ethereum.core.ez_token_transfers
    where tx_hash in ( select tx_hash from sol_eth )
    group by 1,2
    Run a query to Download Data