mmdrezaShare of Active and New users
    Updated 2022-10-16
    with new_user as (
    select
    min(block_timestamp) as min_date,
    from_address
    from gnosis.core.fact_transactions
    where block_timestamp >= current_Date - 30
    group by 2
    )
    select
    date_trunc('day',min_date)as date,
    'New Users' as users,
    count(distinct from_address) as count_new_users
    from new_user
    group by 1,2
    UNION
    select
    date_trunc('day',block_timestamp)as date,
    'Active Users' as users,
    count(distinct from_address) as Users_Count
    from gnosis.core.fact_transactions
    where status = 'SUCCESS'
    and block_timestamp >= current_date - 30
    group by 1,2


    Run a query to Download Data