HitmonleeCryptoJUP wallet top pairs
    Updated 2024-11-03
    /* select
    swap_from_symbol || '-' || swap_to_symbol as "TOP_SWAP_PAIRS (Sold-Bought)",
    sum(swap_from_amount_usd) as total_swap_from_amount_usd,
    sum(swap_to_amount_usd) as total_swap_to_amount_usd,
    sum(swap_to_amount_usd) - sum(swap_from_amount_usd) AS slippage_usd
    from
    solana.defi.ez_dex_swaps
    where
    swapper = '{{Address}}'
    -- swap_from_amount_usd >= 1 AND
    -- swap_to_amount_usd >= 1
    group by
    "TOP_SWAP_PAIRS (Sold-Bought)"
    -- having
    -- "TOP_SWAP_PAIRS (Sold-Bought)" IS NOT NULL AND "TOP_SWAP_PAIRS (Sold-Bought)" <> ''
    order by
    total_swap_from_amount_usd DESC
    limit 100;

    */

    select
    swap_from_symbol || '-' || swap_to_symbol as "TOP_SWAP_PAIRS (Sold-Bought)",
    sum(swap_from_amount_usd) as total_swap_from_amount_usd,
    sum(swap_to_amount_usd) as total_swap_to_amount_usd,
    sum(swap_to_amount_usd) - sum(swap_from_amount_usd) AS slippage_usd
    -- sum(sum(swap_to_amount_usd) - sum(swap_from_amount_usd)) over () as total_slippage_usd

    from
    solana.defi.ez_dex_swaps
    where
    swapper = '{{Address}}'
    and swap_program ILIKE '%jupiter%'
    -- and swap_from_amount_usd >= 1 AND
    -- swap_to_amount_usd >= 1
    group by
    QueryRunArchived: QueryRun has been archived