Afonso_DiazOvertime
    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'
    ),

    first_swaps as (
    select
    swapper,
    min(block_timestamp) as first_swap_time
    from
    main
    group by
    swapper
    ),

    new_swappers as (
    select
    QueryRunArchived: QueryRun has been archived