Afonso_Diazactive and new users overtime + retention rate
    Updated 2025-03-27
    with

    pricet as (
    select
    hour::date as date,
    token_address,
    symbol,
    avg(price) as token_price_usd
    from ronin.price.ez_prices_hourly
    group by 1, 2, 3
    ),

    txns as (
    select
    tx_hash,
    block_timestamp,
    b.from_address as seller_address,
    b.to_address as buyer_address,
    b.contract_address as collection_id,
    b.name as collection_name,
    pricet.symbol,
    (a.decoded_log:acceptedSettlePrice / 1e18) as price,
    price * token_price_usd as price_usd,
    quantity,
    token_id,
    a.decoded_log:settleToken as token_address
    from ronin.core.ez_decoded_event_logs a
    join ronin.nft.ez_nft_transfers b using (tx_hash, block_timestamp)
    left join pricet on block_timestamp::date = date and a.decoded_log:settleToken = token_address
    where event_name = 'OrderMatched'
    and decoded_log:order[0]:extraData[0][2] = token_id
    and decoded_log::string ilike '%' || from_address || '%'
    and tx_succeeded
    ),


    Last run: 30 days ago
    MONTH
    ROLE
    ACTIVE_USERS
    OLD_USERS
    NEW_USERS
    RETENTION_RATE
    1
    2024-10-01 00:00:00.000buyer112200112200
    2
    2024-10-01 00:00:00.000seller139600139600
    3
    2024-11-01 00:00:00.000buyer154944203112910.271266
    4
    2024-11-01 00:00:00.000seller175865705118810.324406
    5
    2024-12-01 00:00:00.000buyer13398576076380.429915
    6
    2024-12-01 00:00:00.000seller17814800198130.449141
    7
    2025-01-01 00:00:00.000buyer11070433967310.39196
    8
    2025-01-01 00:00:00.000seller14723634583780.430958
    9
    2025-02-01 00:00:00.000buyer9413376256510.39966
    10
    2025-02-01 00:00:00.000seller13093562874650.429848
    11
    2025-03-01 00:00:00.000buyer12245404282030.330094
    12
    2025-03-01 00:00:00.000seller13659546781920.400249
    12
    720B
    41s