Afonso_Diaztotal (contracts)
    Updated 2025-01-05
    with

    transactions as (
    select
    contract_address,
    tx_hash,
    block_timestamp,
    tx_fee,
    from_address as user
    from
    mantle.core.fact_event_logs
    join
    mantle.core.fact_transactions using (tx_hash, block_timestamp)
    where
    tx_succeeded
    )

    select
    count(distinct contract_address) as total_contracts,
    count(distinct tx_hash) as transactions,
    count(distinct user) as users,
    sum(tx_fee) / total_contracts as average_fee_volume_per_contract,
    transactions / total_contracts as average_transactions_per_contract,
    total_contracts / users as average_contracts_per_user
    from
    transactions
    where
    block_timestamp::date between '{{ start_date }}' and '{{ end_date }}'



    QueryRunArchived: QueryRun has been archived