0xHaM-dSwap Over Time
    Updated 2025-02-19
    with balanceTb as (
    select
    owner ,
    balance
    from solana.core.fact_token_balances
    where mint = 'MNDEFzGvMt87ueuHvVU9VcTqsAP5b3fTGPsHuuPA5ey'
    qualify row_number() over (partition by owner order by block_timestamp desc) = 1
    )
    , mnde_price as (
    select
    hour,
    price as price
    from solana.price.ez_prices_hourly
    where symbol = 'MNDE'
    )
    select
    trunc(BLOCK_TIMESTAMP,'week') as date,
    avg(price) as price,
    count(distinct TX_ID) as swaps,
    count(distinct SWAPPER) as swappers,
    sum(case when SWAP_FROM_MINT = 'MNDEFzGvMt87ueuHvVU9VcTqsAP5b3fTGPsHuuPA5ey' then SWAP_FROM_AMOUNT_USD else 0 end) as swap_from_amount_usd,
    sum(case when SWAP_TO_MINT = 'MNDEFzGvMt87ueuHvVU9VcTqsAP5b3fTGPsHuuPA5ey' then SWAP_TO_AMOUNT_USD else 0 end) as swap_TO_amount_usd,
    sum(coalesce(SWAP_FROM_AMOUNT_USD,SWAP_TO_AMOUNT_USD)) as swap_amount_usd,
    sum(swaps) over (order by date) as total_swaps,
    sum(swap_amount_usd) over (order by date) as total_swap_amount_usd
    from solana.marinade.ez_swaps
    join mnde_price on trunc(BLOCK_TIMESTAMP,'d') = trunc(hour,'d')
    where (
    SWAP_FROM_MINT = 'MNDEFzGvMt87ueuHvVU9VcTqsAP5b3fTGPsHuuPA5ey'
    or SWAP_TO_MINT = 'MNDEFzGvMt87ueuHvVU9VcTqsAP5b3fTGPsHuuPA5ey'
    )
    and SWAPPER in (select distinct owner from balanceTb)
    group by 1
    order by 1 desc


    Last run: 2 months ago
    DATE
    PRICE
    SWAPS
    SWAPPERS
    SWAP_FROM_AMOUNT_USD
    SWAP_TO_AMOUNT_USD
    SWAP_AMOUNT_USD
    TOTAL_SWAPS
    TOTAL_SWAP_AMOUNT_USD
    1
    2025-02-17 00:00:00.0000.108918053310601933199773.144473123.847692610.89509164776927508.8
    2
    2025-02-10 00:00:00.0000.1152437387560214401878327025300234.5644765739.849498564769234898
    3
    2025-02-03 00:00:00.0000.112785758422453214624199.3611561736.7226248961.049442544724469158.16
    4
    2025-01-27 00:00:00.0000.1276339368434071217623516.5617882055.8435726046.969400304698220197.12
    5
    2025-01-20 00:00:00.0000.14439243697784114744733023.5244949564.48908707989356904662494150.16
    6
    2025-01-13 00:00:00.0000.12958675349194114553074132.5646324277.76101564306.649279064571623352.16
    7
    2025-01-06 00:00:00.0000.111258285330968411312030.649131718.4820376359.529187124470059045.52
    8
    2024-12-30 00:00:00.0000.1264447289338882312603394.568135604.7220787470.649154034449682686
    9
    2024-12-23 00:00:00.0000.1312615122292865012037950.247521461.0419569653.049120154428895215.36
    10
    2024-12-16 00:00:00.0000.15061325445523100229857349.0422510710.4852922174.169090874409325562.32
    11
    2024-12-09 00:00:00.0000.1877797738970113464945691446631682.9697170225.369035644356403388.16
    12
    2024-12-02 00:00:00.0000.16579141099754120037515165.8446517469.3686929773.368938634259233162.8
    13
    2024-11-25 00:00:00.0000.1428424584354869917057291.5218945269.0435523975.68841094172303389.44
    14
    2024-11-18 00:00:00.0000.1412511847359093915096905.2814255821.230602488.88805614136779413.84
    15
    2024-11-11 00:00:00.0000.13907786355895115624585815.281802973042845487.128769714106176925.04
    16
    2024-11-04 00:00:00.0000.133731638210394129739291971.7643700295.8482741208.888710764063331437.92
    17
    2024-10-28 00:00:00.0000.105380654132377487993570.85674073.2813957337.768606823980590229.04
    18
    2024-10-21 00:00:00.0000.108249010335949407744296.246908728.3214563892.888574453966632891.28
    19
    2024-10-14 00:00:00.0000.106427448328488557426013.046120123.8413559945.528538513952068998.4
    20
    2024-10-07 00:00:00.0000.112922548237598019256811.767424672.6416351894.328510033938509052.88
    ...
    135
    14KB
    421s