Pine Analyticspump.fun dex v1 copy
    Updated 2025-03-21
    WITH tab1 AS (
    SELECT
    tx_id,
    block_timestamp,
    signers[0] AS trader,
    inner_instruction['instructions'][0]['parsed']['info']['mint'] AS token_in,
    inner_instruction['instructions'][0]['parsed']['info']['tokenAmount']['uiAmount'] AS amount_in,
    inner_instruction['instructions'][1]['parsed']['info']['mint'] AS token_out,
    inner_instruction['instructions'][1]['parsed']['info']['tokenAmount']['uiAmount'] AS amount_out
    FROM solana.core.fact_events
    WHERE program_id = 'pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA'
    AND succeeded
    AND ARRAY_SIZE(instruction['accounts']) = 17
    AND amount_in IS NOT NULL
    AND amount_out IS NOT NULL
    AND inner_instruction['instructions'][1]['parsed']['info']['mint'] IS NOT NULL
    )

    SELECT
    DATE(block_timestamp) AS date,
    COUNT(DISTINCT tx_id) AS swaps,
    COUNT(DISTINCT trader) AS traders,
    SUM(CASE
    WHEN token_in = 'So11111111111111111111111111111111111111112' THEN amount_in
    WHEN token_out = 'So11111111111111111111111111111111111111112' THEN amount_out
    END) AS swap_volume_sol
    FROM tab1
    GROUP BY 1
    ORDER BY 1;







    Last run: about 1 month ago
    DATE
    SWAPS
    TRADERS
    SWAP_VOLUME_SOL
    1
    2025-02-24 00:00:00.0001764295441.369537778
    2
    2025-02-25 00:00:00.0001783328.664570466
    3
    2025-02-26 00:00:00.00076291.02885387
    4
    2025-02-27 00:00:00.00062174.318775274
    5
    2025-02-28 00:00:00.000993571.371740091
    6
    2025-03-01 00:00:00.0002560.204338075
    7
    2025-03-02 00:00:00.0002080.337385083
    8
    2025-03-03 00:00:00.00028140.430405704
    9
    2025-03-04 00:00:00.00040150.376617357
    10
    2025-03-05 00:00:00.00021130.639315724
    11
    2025-03-06 00:00:00.00043112.059330683
    12
    2025-03-07 00:00:00.00062110.377155911
    13
    2025-03-08 00:00:00.0002070.176761934
    14
    2025-03-09 00:00:00.00018100.129796881
    15
    2025-03-10 00:00:00.00053330.191754409
    16
    2025-03-11 00:00:00.00063171.125593511
    17
    2025-03-12 00:00:00.00090160.854870242
    18
    2025-03-13 00:00:00.00047130.131912983
    19
    2025-03-14 00:00:00.00049121.855110243
    20
    2025-03-15 00:00:00.0001070.347479515
    26
    1KB
    3s