h4wkMayan new users
    Updated 23 hours ago
    -- forked from debridge new user @ https://flipsidecrypto.xyz/studio/queries/5eeede82-0b54-4c78-a9fb-05ca811be46e

    with price as (
    select hour::date as price_date,
    token_address,
    case when token_address in ('Dn4noZ5jgGfkntzcQSUZ8czkreiZ1ForXYoV2H8Dm7S1', '8qJSyQprMC57TWKaYEmetUR3UUiTP2M3hXdcvFhkZdmv') then 'USDT'
    when token_address in ('A9mUU4qviSctJVPJdBJWkb28deg915LYJKrzQ19ji3FM', 'FCqfQSujuPxy6V42UvafBhsysWtEq1vhjfMN1PUbgaxA') then 'USDC'
    when token_address in ('33fsBLA8djQm82RpHmE3SuVrPGtZBWNYExsEUeKX1HXX', '5RpUwQ8wtdPCZHhu6MERp2RGrpobsbZ6MH5dDHkUjs2') then 'BUSD'
    else symbol end as symbol,
    avg(price) as price
    from solana.price.ez_prices_hourly
    where price_date = Current_date
    and token_address not in ('96fxUxwiZm9rkCdDaP2qmB73eA8FcD3wTeuczTtmkdk3') -- SPEPE
    group by all
    )
    , base as (
    select
    block_timestamp,
    user_address
    from solana.defi.fact_bridge_activity
    join price on (token_address = mint)
    where succeeded
    and platform = 'mayan finance'
    )
    , first_date as (
    select
    user_address,
    min(block_timestamp) as first_date
    from base
    group by 1
    )

    , daily_new_users as (
    select
    first_date::date as date,
    count(distinct user_address) as daily_new_user_count
    Last run: about 23 hours agoAuto-refreshes every 24 hours
    DATE
    DAILY_USER_COUNT
    DAILY_NEW_USER_COUNT
    RETURNING_USER
    DAILY_USER_COUNT_7_DAY_AVG
    1
    2025-01-21 00:00:00.0005722334923735722
    2
    2025-01-22 00:00:00.0005349299423555535.5
    3
    2025-01-23 00:00:00.0004615251221035228.666
    4
    2025-01-24 00:00:00.0005821350623155376.75
    5
    2025-01-25 00:00:00.0007889502628635879.2
    6
    2025-01-26 00:00:00.0009163581733466426.5
    7
    2025-01-27 00:00:00.0007589409434956592.571
    8
    2025-01-28 00:00:00.0007758444633126883.428
    9
    2025-01-29 00:00:00.0006259351727427013.428
    10
    2025-01-30 00:00:00.0006271352427477250
    11
    2025-01-31 00:00:00.0005805316826377247.714
    12
    2025-02-01 00:00:00.0005073271823556845.428
    13
    2025-02-02 00:00:00.0004640241322276199.285
    14
    2025-02-03 00:00:00.0005188263925495856.285
    15
    2025-02-04 00:00:00.0004854276120935441.428
    16
    2025-02-05 00:00:00.0004097222518725132.571
    17
    2025-02-06 00:00:00.0004261229719644845.428
    18
    2025-02-07 00:00:00.0003853202218314566.571
    19
    2025-02-08 00:00:00.0003850202618244391.857
    20
    2025-02-09 00:00:00.0004337231320244348.571
    90
    4KB
    231s