ValiMohammadiTOP10.OPTIMISM (Last 45 days)
    Updated 2022-11-16
    with price as (select hour::date as date,
    avg(price) as eth_price
    from ethereum.core.fact_hourly_token_prices
    where symbol = 'WETH'
    and hour >= current_date - 45
    group by 1)

    select from_address,
    sum(tx_fee * eth_price) as fee_usd,
    row_number () over (order by fee_usd desc) as count
    from optimism.core.fact_transactions a
    join price b on a.block_timestamp::date = b.date
    where block_timestamp >= current_date - 45
    group by 1
    order by 2 desc
    limit 10
    Run a query to Download Data