x1sgdomestic-ivory
    Updated 2024-11-22
    WITH microbuyers AS (
    SELECT
    swapper,
    swap_from_amount
    FROM solana.defi.fact_swaps
    WHERE swap_from_mint = 'So11111111111111111111111111111111111111112'
    AND swap_from_amount < 0.1
    ),
    max_amounts AS (
    SELECT
    swapper,
    block_timestamp,
    swap_to_mint,
    swap_from_mint,
    tx_id,
    MAX(swap_to_amount) AS max_swap_to_amount,
    MAX(swap_from_amount) AS max_swap_from_amount
    FROM
    solana.defi.fact_swaps
    WHERE
    succeeded = TRUE
    AND block_timestamp > '2024-11-20'
    AND swap_from_mint != 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'
    AND swap_to_mint != 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'
    AND swapper NOT IN (SELECT swapper FROM microbuyers)
    GROUP BY
    swapper,
    swap_to_mint,
    swap_from_mint,
    tx_id,
    block_timestamp
    ),
    last_trade AS (
    SELECT
    swapper,
    MAX(block_timestamp) AS max_bt
    QueryRunArchived: QueryRun has been archived