elsina2025-02-25: avg daily new users percentage
    Updated 2025-04-07
    with base as (
    SELECT
    e.block_timestamp,
    e.origin_from_address,
    e.tx_hash,
    tx_fee,
    from
    ronin.core.fact_event_logs e
    left join ronin.core.fact_transactions t on e.tx_hash = t.tx_hash
    where
    e.tx_succeeded = TRUE
    and origin_to_address in (
    '0xb806028b6ebc35926442770a8a8a7aeab6e2ce5c',
    '0x02790f32ad7e7eaaecfb0ad21950829932f1a2ee',
    '0x7eae20d11ef8c779433eb24503def900b9d28ad7',
    '0x1b918543b518e34902e1e8dd76052bee43c762ff'
    )
    ),

    first_tx_of_each_users AS (
    SELECT
    origin_from_address,
    MIN(block_timestamp) AS min_date
    FROM
    base
    GROUP BY
    origin_from_address
    ),

    new_users AS (
    SELECT
    date_trunc('day', min_date) AS date,
    COUNT(DISTINCT origin_from_address) AS new_user_count
    FROM
    first_tx_of_each_users
    GROUP BY
    Last run: 22 days ago
    AVG_PERCENT_NEW_USERS
    1
    3.116908203
    1
    15B
    28s