elsina2024-07-19: token breakdown
    Updated 2024-07-19
    with price as (
    select
    hour,
    token_address,
    symbol,
    decimals,
    avg (price) as usd_amount
    from crosschain.price.ez_prices_hourly
    group by 1,2,3,4)



    SELECT
    token_symbol,
    COUNT(DISTINCT tx_hash) AS transaction_count,
    COUNT(DISTINCT sender) AS unique_sender_count,
    SUM(amount*usd_amount) AS transaction_volume,
    transaction_count / unique_sender_count AS average_transactions_per_user,
    transaction_volume / unique_sender_count AS average_volume_per_user,
    transaction_volume / transaction_count AS average_volume_per_transaction
    FROM
    axelar.defi.ez_bridge_satellite t1 join price t2 on date_trunc('hour', t1.block_timestamp) = t2.hour and t1.token_address = t2.token_address
    WHERE
    block_timestamp::date >= '2024-01-01'
    group by token_symbol
    having transaction_count > 10




    QueryRunArchived: QueryRun has been archived