h4wktornado eth buckets month
    Updated 2022-08-11
    with tornado as (
    select address, split_part(address_name, ':', 2) as address_name
    from flipside_prod_db.crosschain.address_labels
    where project_name ilike '%tornado%' and blockchain = 'ethereum'
    )

    , eth_transfer as (
    select address, address_name,
    block_timestamp,
    tx_hash,
    eth_from_address as from_address,
    eth_to_address as to_address,
    'ETH' as token,
    amount as token_amount
    from ethereum.core.ez_eth_transfers
    join tornado on eth_from_address = address or eth_to_address = address
    where block_timestamp::date < current_date and token_amount > 0 and amount_usd > 0
    )

    select
    address, address_name,
    token,
    count(case when address = to_address then tx_hash end) as receive_tx,
    count(distinct (case when address = to_address then from_address end)) as senders,
    sum(case when address = to_address then token_amount end) as receive_amount
    from eth_transfer where block_timestamp::date < current_date and block_timestamp::date >= current_date - 30
    group by 1, 2, 3 having address_name like '%eth%'
    Run a query to Download Data