NDuvNew & Old
    Updated 2024-07-02
    select
    count(distinct from_address)
    from thorchain.core.fact_transfers
    where block_timestamp::date >= '2024-01-01'block_timestamp) min,
    user
    from tb1
    group by 2
    )
    ,tb3 as (
    select *
    from tb2
    where min::date >= '2024-01-01'
    )
    select trunc(block_timestamp,'day') day,
    case when from_address in (select user from tb3) then 'New user' else 'Old user' end as type,
    count(distinct from_address) Daily_trans
    from thorchain.core.fact_transfers
    where block_timestamp::date >= '2024-01-01'
    group by 1,2


    QueryRunArchived: QueryRun has been archived