jackguyss swaps 7
    Updated 2024-01-30
    WITH tab1 AS (
    SELECT
    SWAPPER,
    count(DISTINCT date(block_timestamp)) as active_days,
    count(DISTINCT TX_ID) as swaps,
    min(date(block_timestamp)) as first_day
    FROM sei.defi.fact_dex_swaps
    WHERE platform LIKE 'seaswap'
    GROUP BY 1
    ),
    agg_new_users AS (
    SELECT
    first_day,
    count(*) as new_users
    FROM tab1
    GROUP BY 1
    ),
    cumulative_users AS (
    SELECT
    *,
    sum(new_users) over (order by first_day) as total_users
    FROM agg_new_users
    )
    SELECT
    first_day,
    new_users,
    total_users,
    sum(new_users) OVER (ORDER BY first_day ASC ROWS BETWEEN 6 PRECEDING AND CURRENT ROW) AS seven_day_new_users,
    sum(new_users) OVER (ORDER BY first_day ASC ROWS BETWEEN 29 PRECEDING AND CURRENT ROW) AS thirty_day_new_users
    FROM cumulative_users
    ORDER BY first_day DESC
    Last run: about 1 year agoAuto-refreshes every 6 hours
    FIRST_DAY
    NEW_USERS
    TOTAL_USERS
    SEVEN_DAY_NEW_USERS
    THIRTY_DAY_NEW_USERS
    1
    2024-01-29 00:00:00.0001239311106
    2
    2024-01-28 00:00:00.0002239211106
    3
    2024-01-27 00:00:00.0003239012112
    4
    2024-01-24 00:00:00.0001238711124
    5
    2024-01-23 00:00:00.0001238611128
    6
    2024-01-22 00:00:00.0002238514146
    7
    2024-01-21 00:00:00.0001238314206
    8
    2024-01-19 00:00:00.0001238215297
    9
    2024-01-18 00:00:00.0003238116434
    10
    2024-01-17 00:00:00.0002237815435
    11
    2024-01-15 00:00:00.0001237616447
    12
    2024-01-14 00:00:00.0004237518449
    13
    2024-01-13 00:00:00.0002237119447
    14
    2024-01-12 00:00:00.0002236926449
    15
    2024-01-11 00:00:00.0002236733452
    16
    2024-01-10 00:00:00.0002236541460
    17
    2024-01-09 00:00:00.0003236342464
    18
    2024-01-08 00:00:00.0003236042464
    19
    2024-01-07 00:00:00.0005235745463
    20
    2024-01-06 00:00:00.0009235241464
    ...
    157
    6KB
    2s