cypherHop - usdc statistics
    Updated 2022-06-21
    with hop_to_l2_usdc as (select
    block_timestamp,
    tx_hash,
    origin_from_address as user,
    event_inputs:amount/1e6 as amount,
    event_inputs:"chainId"::integer as chain_id,
    case chain_id
    when 137 then 'Polygon'
    when 100 then 'xDai'
    when 10 then 'Optimism'
    when 42161 then 'Arbitrum'
    end as chain,
    'hop' as bridge
    from ethereum.core.fact_event_logs
    where block_timestamp >= '2022-1-1'
    and contract_address = lower('0x3666f603Cc164936C1b87e207F36BEBa4AC5f18a')
    and event_name = 'TransferSentToL2'
    and tx_status = 'SUCCESS'),

    daily_unique_n_users as (select
    date_trunc('day', block_timestamp) as date,
    count(distinct(user)) as unique_users,
    chain
    from hop_to_l2_usdc
    where chain != 'xDai'
    group by date, chain),

    daily_frequency_of_use as (select
    date_trunc('day', block_timestamp) as date,
    count(distinct(tx_hash)) as unique_tx,
    chain
    from hop_to_l2_usdc
    where chain != 'xDai'
    group by date, chain),

    daily_avg_moved as (select
    Run a query to Download Data