hmxinternTotal Users
    Updated 2024-09-16
    with RECURSIVE date_series as (
    SELECT
    '2024-03-01'::date as time
    UNION ALL
    SELECT
    DATEADD(day, 1, time)
    FROM
    date_series
    WHERE
    time < date_trunc('day', current_timestamp())
    ),
    all_users as (
    select *
    from
    (
    select block_timestamp as time, decoded_log['primaryAccount'] as account
    from blast.core.fact_decoded_event_logs
    where contract_address = lower('0x0b71cBBAd974B9DF8BDF6A83973B710AAa48e7ac')
    and event_name = 'LogDepositCollateral'
    )
    union all
    (
    select block_timestamp as time, decoded_log['account'] as account
    from blast.core.fact_decoded_event_logs
    where contract_address = lower('0xF0D92907236418Fa8Ee900E384b4c6928f7cADfc')
    and event_name = 'AddLiquidity'
    )
    ),
    unique_users as (
    select date_trunc('day',time) as time, count(account) as new_users
    from
    (
    select min(time) as time, account from all_users
    group by account
    )
    group by 1
    QueryRunArchived: QueryRun has been archived