Pine Analyticssilky-scarlet
    Updated 2025-03-19
    WITH log_data AS (
    SELECT
    signers[0] as wallet,
    tx_id as tx
    FROM
    eclipse.core.fact_transactions t,
    TABLE(FLATTEN(log_messages)) f
    WHERE SUCCEEDED
    AND value in ('Program log: Instruction: SwapV2', 'Program log: Instruction: TwoHopSwapV2')
    and block_timestamp > '2025-01-01'
    ), tab1 as (
    SELECT
    tx_id,
    block_timestamp,
    wallet,
    mint as mint_out,
    amount/power(10, decimal) as out_amount
    from eclipse.core.fact_transfers
    left outer join log_data
    on tx = tx_id
    where tx_id in (SELECT tx from log_data)
    and wallet = tx_to
    ), tab2 as (
    SELECT
    tx_id as tx,
    mint as mint_in,
    amount/power(10, decimal) as in_amount
    from eclipse.core.fact_transfers
    left outer join log_data
    on tx = tx_id
    where tx_id in (SELECT tx from log_data)
    and wallet = tx_from
    and block_timestamp > '2025-01-01'
    ), tab3 as (
    Last run: about 1 month ago
    DATE
    SWAPS
    SWAPPERS
    VOLUME_USD
    1
    2025-02-26 00:00:00.0004254665206453130.84004872
    2
    2025-01-16 00:00:00.00045172101139980679.17032771
    3
    2025-02-04 00:00:00.00053471776314323850.3396751
    4
    2025-02-11 00:00:00.00036095106645205749.44177918
    5
    2025-01-28 00:00:00.00044827106289675365.25463055
    6
    2025-02-13 00:00:00.0003503589875126233.15772194
    7
    2025-02-20 00:00:00.0003170968035444590.19263899
    8
    2025-01-27 00:00:00.00054040994215173814.2025996
    9
    2025-01-22 00:00:00.000660141493015379800.7812401
    10
    2025-02-25 00:00:00.00059657784412509035.9136593
    11
    2025-01-10 00:00:00.00034641109985056358.83682636
    12
    2025-03-07 00:00:00.00078475107577717768.09969963
    13
    2025-01-09 00:00:00.00036444120525293034.04336767
    14
    2025-03-10 00:00:00.0007545793767140410.41554142
    15
    2025-03-01 00:00:00.0004429265334871169.25450692
    16
    2025-03-17 00:00:00.0004278273253512480.72905192
    17
    2025-01-26 00:00:00.00044445113138874755.13863622
    18
    2025-02-07 00:00:00.000538371005310820767.366591
    19
    2025-03-16 00:00:00.0003631457313143457.89465681
    20
    2025-02-09 00:00:00.0003952290077264840.65592513
    78
    4KB
    905s