Updated 2024-03-20
    with t as (
    select
    tx_hash,
    block_timestamp,
    decoded_log:from as user,
    decoded_log:value/1e18 as amount_usd
    from ethereum.core.ez_decoded_event_logs a
    where decoded_log:to = '0x9d39a5de30e57443bff2a8307a4256c8797a3497'
    and event_name = 'Transfer'
    and origin_to_address = decoded_log:to
    and contract_address = '0x4c9edd5852cd905f086c759e8383e09bff1e68b3'
    and tx_hash in (
    select distinct tx_hash from ethereum.core.ez_decoded_event_logs b
    where contract_address = '0x9d39a5de30e57443bff2a8307a4256c8797a3497'
    and event_name = 'Transfer'
    and decoded_log:from = '0x0000000000000000000000000000000000000000'
    and b.decoded_log:to = a.decoded_log:from
    )
    and origin_function_signature = '0x6e553f65'
    and tx_status = 'SUCCESS'
    and block_timestamp::date = '2024-02-15'
    )

    select
    count(distinct tx_hash) as transactions,
    count(distinct user) as users,
    sum(amount_usd) as volume_usd,
    avg(amount_usd) as average_volume_usd,
    median(amount_usd) as median_volume_usd,
    transactions / count(distinct block_timestamp::date) as daily_average_transactions,
    users / count(distinct block_timestamp::date) as daily_average_users
    from t
    QueryRunArchived: QueryRun has been archived