hrst79wallet analyzor copy
    Updated 2024-09-23
    -- forked from wallet analyzor @ https://flipsidecrypto.xyz/studio/queries/5409bad9-1519-452b-bcbe-6d45856aa532

    WITH pump_wallets AS (
    SELECT
    swapper AS wallet,
    COUNT(*) AS trade_count
    FROM
    solana.defi.ez_dex_swaps
    WHERE
    program_id = '6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P'
    AND block_timestamp :: date >= current_date -30
    GROUP BY
    swapper
    HAVING
    COUNT(*) >= 10
    ),
    pump_tokens as (
    select
    DISTINCT Decoded_instruction:accounts [0] :pubkey :: string as token_address
    from
    solana.core.ez_events_decoded
    where
    program_id = '6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P'
    and event_type = 'create'
    -- and token_address != 'AtRidVguSFmMn8NoDXyjzZssubzaPm3Qtat54twTpump'
    ),


    prices as (
    select
    swap_from_mint as token_address,
    swap_to_amount_usd / NULLIF(swap_from_amount, 0) AS tp,
    block_timestamp
    from
    solana.defi.ez_dex_swaps
    where
    QueryRunArchived: QueryRun has been archived