NavidCopy of Copy of Untitled Query
    Updated 2022-08-10
    with addresses as (
    select
    address,
    address_name,
    label_subtype
    from
    ethereum.core.dim_labels
    where
    label like '%tornado cash%'
    ), transactions as (
    select
    date(block_timestamp) as day,
    from_address,
    eth_value
    from
    ethereum.core.fact_transactions
    where
    to_address in (select address from addresses) and
    status = 'SUCCESS'
    ), transactions_aggregated as (
    select
    -- day,
    from_address,
    count(*) as user_transactions_count,
    sum(eth_value) as user_volume
    from
    transactions
    group by
    from_address
    ), transactions_aggregated_labled as (
    select
    from_address,
    case
    when user_transactions_count <=1 then '1 Transactions'
    when user_transactions_count <=10 then '1-10 Transactions'
    when user_transactions_count <=100 then '10-100 Transactions'
    Run a query to Download Data