elsinaThe addresses received the most volume in the last quarter
    Updated 2022-08-10
    with eth_price as (
    select hour::date as date, avg(price) as price
    from ethereum.core.fact_hourly_token_prices
    where date >= current_date - 365 and symbol = 'WETH'
    group by 1
    ),
    vol as (
    select
    address,
    address_name,
    sum(amount * price) as volume_in_usd
    from
    ethereum.core.ez_eth_transfers join
    flipside_prod_db.crosschain.address_labels on
    eth_to_address = address join
    eth_price on
    block_timestamp::date = date
    where
    block_timestamp::date >= current_date - 90 and
    project_name = 'tornado cash' and
    label_subtype = 'general_contract' and
    blockchain = 'ethereum'
    group by 1, 2

    union all

    select
    address,
    address_name,
    sum(amount_usd) as volume_in_usd
    from
    ethereum.core.ez_token_transfers join
    flipside_prod_db.crosschain.address_labels on
    to_address = address
    where
    block_timestamp::date >= current_date - 90 and
    Run a query to Download Data