Pine AnalyticsVector 1 copy
    Updated 8 hours ago
    with tab1 as (
    SELECT
    DISTINCT tx_id
    from solana.core.fact_events
    where program_id like 'VFeesufQJnGunv2kBXDYnThT1CoAYB45U31qGDe5QjU'
    and block_timestamp > '2024-09-01'
    and SUCCEEDED
    )

    SELECT *
    FROM (
    SELECT
    date_trunc('day', block_timestamp) as date,
    count(DISTINCT tx_id) as events,
    count(DISTINCT swapper) as swappers,
    sum(
    case when not SWAP_FROM_AMOUNT_USD is null then SWAP_FROM_AMOUNT_USD
    when not SWAP_to_AMOUNT_USD is null then SWAP_to_AMOUNT_USD else 0 end
    ) AS SWAP_VOLUME_USD,
    swap_volume_usd * 0.01 as fees_usd

    from solana.defi.ez_dex_swaps
    where tx_id in (SELECT * from tab1)
    and block_timestamp > '2024-09-01'
    GROUP BY 1
    )
    where date > '2024-09-01'







    Last run: about 8 hours ago
    DATE
    EVENTS
    SWAPPERS
    SWAP_VOLUME_USD
    FEES_USD
    1
    2025-01-19 00:00:00.00068057523720738983.26207389.8326
    2
    2024-11-30 00:00:00.0005529464854171.158541.7115
    3
    2024-09-07 00:00:00.000155209137.7291.3772
    4
    2025-01-10 00:00:00.0006850336597099717.2670997.1726
    5
    2024-10-18 00:00:00.000179494196976.141969.7614
    6
    2024-10-29 00:00:00.000138679119345.31193.453
    7
    2024-11-25 00:00:00.0001934192357414.323574.1432
    8
    2025-02-15 00:00:00.00069671146552046.765520.4676
    9
    2025-02-04 00:00:00.0004835332454731943.847319.438
    10
    2024-12-20 00:00:00.0001777214422456688.6424566.8864
    11
    2024-10-27 00:00:00.0006077868152.19681.5219
    12
    2024-09-03 00:00:00.000701822676.07226.7607
    13
    2024-11-01 00:00:00.00015198499103.94991.0394
    14
    2024-11-22 00:00:00.0001682141265767.752657.6775
    15
    2024-12-29 00:00:00.0001712812743086785.4130867.8541
    16
    2024-12-03 00:00:00.0008191827981302.779813.0277
    17
    2024-11-03 00:00:00.00091678103938.611039.3861
    18
    2025-01-06 00:00:00.0003982925005389705.8753897.0587
    19
    2024-11-20 00:00:00.00060854166051.581660.5158
    20
    2024-10-14 00:00:00.000138494182165.491821.6549
    ...
    167
    9KB
    126s