hessActive Users
    Updated 2023-04-19
    with transactions as ( select tx_sender, count(DISTINCT(block_timestamp::date)) as active_day
    from terra.core.fact_transactions
    where block_timestamp >= current_date - 180
    group by 1
    having active_day > 14
    )
    ,
    new_user as ( select tx_sender, min(block_timestamp::date) as date
    from terra.core.fact_transactions
    group by 1
    )
    ,
    new as ( select date, tx_sender
    from new_user
    where date >= '2023-01-01')

    select 'New Users' as type, date, count(DISTINCT(tx_sender)) as total_user
    from new
    group by 1,2
    UNION
    select 'Active Users' as type, date(block_timestamp) as date, count(DISTINCT(tx_sender)) as total_user
    from terra.core.fact_transactions
    where tx_sender in (select tx_sender from transactions)
    and block_timestamp >= '2023-01-01'
    group by 1,2
    Run a query to Download Data