nickpayiatis_by contract
    SELECT
    DATE_TRUNC('day', BLOCK_TIMESTAMP) AS day,
    c.name,
    SUM(TX_FEE) AS total_fees
    FROM avalanche.core.fact_transactions txs
    left join avalanche.core.dim_contracts c
    on txs.to_address = c.address
    where
    name is not null
    --and block_timestamp::date > '2023-01-01'
    GROUP BY day, c.name
    QUALIFY ROW_NUMBER() OVER (PARTITION BY day ORDER BY total_fees DESC) <= 10;


    Run a query to Download Data