hessWeekly New Users
    Updated 2025-01-15
    with swap as ( select block_timestamp,
    tx_id,
    from_address,
    blockchain,
    pool_name,
    from_asset,
    to_asset,
    case when from_amount_usd is null then to_amount_usd else from_amount_usd end as amount_usd
    from thorchain.defi.fact_swaps)
    ,
    new_users as ( select min(block_timestamp::date) as date,
    from_address
    from swap
    group by 2)

    select trunc(date,'week') as weekly ,
    count(DISTINCT from_address) as "New Users",
    sum("New Users") over (order by weekly asc) as "Cumulative New Users"
    from new_users
    where date >= '2021-04-05'
    group by 1
    Last run: 3 months ago
    WEEKLY
    New Users
    Cumulative New Users
    1
    2023-10-16 00:00:00.0005948237317
    2
    2023-01-23 00:00:00.000132195427
    3
    2023-12-11 00:00:00.0005857294283
    4
    2023-06-26 00:00:00.0004655158011
    5
    2024-08-05 00:00:00.0006407510437
    6
    2021-05-17 00:00:00.00011745067
    7
    2022-02-07 00:00:00.00049440962
    8
    2022-07-25 00:00:00.00053975256
    9
    2022-04-25 00:00:00.000182664831
    10
    2022-01-24 00:00:00.00053340010
    11
    2023-03-13 00:00:00.0003217112491
    12
    2022-12-19 00:00:00.000170487770
    13
    2024-10-14 00:00:00.0005602556785
    14
    2024-03-11 00:00:00.00010813375652
    15
    2024-01-01 00:00:00.0005458310051
    16
    2022-11-21 00:00:00.00056583494
    17
    2024-12-23 00:00:00.0008288652369
    18
    2024-04-08 00:00:00.0008020407210
    19
    2024-02-05 00:00:00.0004406334621
    20
    2021-10-11 00:00:00.00052126570
    ...
    190
    7KB
    3s