defi__joshSton.fi DEX Daily Trading Metrics with User Analytics and Version Comparison
    Updated 2025-04-28
    with
    tradeswithfees as (
    select
    date(block_timestamp) as block_date,
    block_timestamp,
    volume_usd,
    version,
    trader_address,
    pool_address,
    tx_hash
    from
    ton.defi.fact_dex_trades
    where
    project = 'ston.fi'
    and block_timestamp >= '2022-11-19'
    ),
    firstuseroccurrences as (
    select
    trader_address as user,
    min(date(block_timestamp)) as firsttradedate
    from
    ton.defi.fact_dex_trades
    where
    project = 'ston.fi'
    and block_timestamp >= '2022-11-19'
    group by
    trader_address
    )

    select
    block_date as "day",
    sum(volume_usd) as "volume (USD)",
    coalesce(sum(case when version = 1 then volume_usd else null end), 0) as "v1 volume (USD)",
    coalesce(sum(case when version = 2 then volume_usd else null end), 0) as "v2 volume (USD)", --- version 2 was launched on 2024-09-25
    sum(sum(case when version = 1 then volume_usd else 0 end)) over (order by block_date) as "cumulative v1 volume (USD)",
    sum(sum(case when version = 2 then volume_usd else 0 end)) over (order by block_date) as "cumulative v2 volume (USD)",
    Last run: about 1 month ago
    day
    volume (USD)
    v1 volume (USD)
    v2 volume (USD)
    cumulative v1 volume (USD)
    cumulative v2 volume (USD)
    number of users
    number of new users
    number of trades
    number of pairs
    number of returning users
    cumulative number of new users
    cumulative volume (USD)
    cumulative number of trades
    1
    2025-04-27 00:00:00.00031200728992572220815446424820513983148671272154613156057772605051767586256307224582130
    2
    2025-04-26 00:00:00.00027831187216232061495446334894813960940521375662243201456475325046306585944300024550570
    3
    2025-04-25 00:00:00.00041846308632273321403446262732513940325571339653043051459880925040082585665988224518556
    4
    2025-04-24 00:00:00.00035624639974782564985446176409813907111541730890923796756582165034778585247525224488042
    5
    2025-04-23 00:00:00.000382596012579952567965446076662013881461691828484614182261098235025686584891278924450075
    6
    2025-04-22 00:00:00.00033248367432382581598445950862513855782041748998054134857676845017225584508682924408253
    7
    2025-04-21 00:00:00.000283218476999320621914458765387138299660621166133104870456878565007420584176199324366905
    8
    2025-04-20 00:00:00.000224886451027717385874457995394138093441520626132854813252373414994110583892980924318201
    9
    2025-04-19 00:00:00.000200575851399514917634457485117137919582817134101164035957570184980825583668094524270069
    10
    2025-04-17 00:00:00.000273003380965319203804456971122137770406519701111394691955185624970709583467518724229710
    11
    2025-04-16 00:00:00.000327688598270622941794456161469137578368520191105504944359596414959570583194515424182791
    12
    2025-04-15 00:00:00.0003254346100596722483794455178763137348950621883130675265459288164949020582866826924133348
    13
    2025-04-14 00:00:00.0003615014111501425000004454172796137124112724537163145815558082234935953582541392324080694
    14
    2025-04-13 00:00:00.0003126166105320920729574453057782136874112725336165516088957087854919639582179890924022539
    15
    2025-04-12 00:00:00.0003633746124699623867504452004573136666817029793200466888359297474903088581867274323961650
    16
    2025-04-11 00:00:00.0007455282993714646156844507575771364281420351622428882049610108744883042581503899723892767
    17
    2025-04-10 00:00:00.000594852814094484539080444976386313578198524546033765103254625116954858754580758371523810718
    18
    2025-04-09 00:00:00.000632735521908894136466444835441513532807724954437878111085612116664824989580163518723707464
    19
    2025-04-08 00:00:00.00040581621401200265696244461635261349144306414873130392543590101844787111579530783223596379
    20
    2025-04-07 00:00:00.00094715883660633581095544447623261346487344329842154680261590114384755808579124967023503836
    ...
    482
    56KB
    1s