saeide-ahmadi-7Classification of transactions by value
    Updated 2022-08-10
    with grouped_transactions as(
    select
    TX_HASH,
    case
    when ETH_VALUE < 0.01 then 'A: Under 0.01 ETH'
    when ETH_VALUE>=0.01 and ETH_VALUE<0.1 then 'B: 0.01-0.1 ETH'
    when ETH_VALUE>=0.1 and ETH_VALUE<1 then 'C: 0.1-1 ETH'
    when ETH_VALUE>=1 and ETH_VALUE<10 then 'D: 1-10 ETH'
    when ETH_VALUE>=10 and ETH_VALUE<100 then 'E: 10-100 ETH'
    when ETH_VALUE>=100 then 'F: Above 100 ETH'
    end as bucket
    from
    ethereum.core.fact_transactions join flipside_prod_db.crosschain.address_labels
    on TO_ADDRESS = ADDRESS
    where
    lower(PROJECT_NAME) like '%tornado%' AND STATUS = 'SUCCESS'
    )

    select
    bucket,
    count(distinct TX_HASH) as number_of_transactions
    FROM
    grouped_transactions
    GROUP by
    bucket
    ORDER by
    bucket
    -- number_of_transactions desc

    Run a query to Download Data