Afonso_DiazGrouping txns
    Updated 2025-01-19
    with

    main as (
    select
    tx_id,
    block_timestamp,
    nvl(swap_from_amount_usd, swap_to_amount_usd) as amount_usd,
    case
    when swap_program ilike 'meteora%' then 'Meteora'
    when swap_program ilike 'phoenix%' then 'Phoenix'
    when swap_program ilike 'raydium%' then 'Raydium'
    when swap_program ilike 'orca%' then 'Orca'
    when swap_program ilike 'jupiter%' then 'Jupiter'
    end as platform,
    swap_from_symbol as symbol_in,
    swap_to_symbol as symbol_out,
    swapper
    from
    solana.defi.ez_dex_swaps
    where
    '6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN' in (swap_from_mint, swap_to_mint)
    and block_timestamp >= '2025-01-15'
    )

    select
    case
    when amount_usd < 10 then 'a. Less than 10 $'
    when amount_usd <= 50 then 'b. 10 - 50 $'
    when amount_usd <= 100 then 'c. 50 - 100 $'
    when amount_usd <= 500 then 'd. 100 - 500 $'
    when amount_usd <= 1000 then 'e. 500 - 1000 $'
    when amount_usd <= 5000 then 'f. 1000 - 5000 $'
    when amount_usd <= 10000 then 'g. 5000 - 10,000 $'
    when amount_usd <= 100000 then 'h. 10,000 - 100,000 $'
    else 'i. More than 100,000 $'
    end as type,
    QueryRunArchived: QueryRun has been archived