cypherUntitled Query
    Updated 2022-09-28
    with all_miners as (select
    miner,
    count(*) as n_blocks_mined
    from ethereum.core.fact_blocks
    where block_timestamp <= '2022-9-14'
    group by miner),

    tranfers_by_miners as (select
    date_trunc('day', block_timestamp) as date,
    eth_to_address as wallet,
    amount,
    amount_usd
    from ethereum.core.ez_eth_transfers
    where eth_from_address in (select miner from all_miners)
    and date >= current_date() - 90
    ),

    miners_wallets as (select
    wallet,
    sum(amount) as total_eth,
    sum(amount_usd) as total_usd
    from tranfers_by_miners
    group by wallet
    order by total_eth desc
    )
    select * from miners_wallets
    limit 100
    Run a query to Download Data