MoeUntitled Query
    Updated 2022-08-10
    with eth as (
    select
    date_trunc(day,HOUR) as days,
    avg(PRICE) as pc
    from
    ethereum.core.fact_hourly_token_prices
    where
    symbol ilike 'WETH'
    group by 1
    ),
    txs as (
    select
    t.*,
    ETH_Value * pc as amount_usd
    from ethereum.core.fact_transactions t, eth e
    where TO_ADDRESS in ( select ADDRESS from flipside_prod_db.crosschain.address_labels
    where project_name = 'tornado cash')
    and t.STATUS = 'SUCCESS'
    and t.block_timestamp::date = e.days)


    select
    from_address as wallets,
    count(distinct tx_hash) as transactions,
    sum(amount_usd) as tot_amount_usd,
    sum(eth_value) as tot_amount_eth
    from txs
    where from_address not in ( select ADDRESS from flipside_prod_db.crosschain.address_labels
    where project_name = 'tornado cash')
    group by 1 order by 3 desc limit 100



    Run a query to Download Data