sarathETH mergesell3
    Updated 2022-09-29
    with all_miner as (
    select *
    from(
    select miner, count (distinct block_number) as block_mined
    from ethereum.core.fact_blocks
    group by 1
    )
    where block_mined>10
    ), cex as (
    select address,label
    from ethereum.core.dim_labels
    where label_type = 'cex'
    )

    select tb2.label, count(distinct tx_hash) as tx, sum(amount) as eth
    from ethereum.core.ez_eth_transfers as tb1
    join cex as tb2 on tb1.origin_to_address = tb2.address
    where origin_from_address in (select miner from all_miner)
    and block_timestamp::date>='2022-09-15'
    GROUP by 1
    Run a query to Download Data