freemartianAverage ETH Balance
    Updated 2022-06-23

    with total as (
    select
    distinct origin_from_address as meta_user
    from ethereum.core.fact_event_logs
    where origin_to_address = '0x881d40237659c251811cec9c364ef91dc08d300c')

    select avg(balance) as "Average ETH Balance"
    from flipside_prod_db.ethereum.erc20_balances
    where balance_date = CURRENT_DATE - 1
    and contract_address = 'ETH'
    and user_address in (select meta_user from total)
    Run a query to Download Data