Elprognerd8 - chart of top contracts with highest average fee based on the most number of txn copy
    Updated 2023-03-27
    select
    project_name as "dApp",
    count(x.tx_hash) as "Total fees",
    avg(tx_fee) as "Average txn fee"
    from avalanche.core.fact_transactions x join avalanche.core.fact_event_logs y on x.tx_hash = y.tx_hash
    join avalanche.core.dim_contracts z on y.contract_address = z.address
    where x.block_timestamp >= '{{From_Date}}'
    and x.block_timestamp <= '{{To_Date}}'
    and project_name is not null
    GROUP BY 1
    ORDER BY 2 DESC
    LIMIT 10


    Run a query to Download Data