sinahosseinzadehUntitled Query
    Updated 2022-08-10
    with addresses as (
    select
    address
    from ethereum.core.dim_labels
    WHERE LABEL ilike 'tornado cash'
    ),

    T1 as (
    select
    address,
    sum(amount)*avg(price) as usd_amounts
    from addresses a
    join ethereum.core.ez_token_transfers b
    on a.address = b.to_address
    join ethereum.core.fact_hourly_token_prices c
    on b.symbol = c.symbol
    and b.block_timestamp::date = c.hour::date
    where block_timestamp >= CURRENT_DATE - 360
    group by 1
    )


    select *
    from T1
    order by usd_amounts DESC
    limit 10
    Run a query to Download Data