Pmisha-bmlMdxTotal Churn
    Updated 2022-05-09
    with t1 as (select
    count(*) as no_churn1
    from thorchain.update_node_account_status_events
    where ((FORMER_STATUS='Active' and CURRENT_STATUS='Standby') or (FORMER_STATUS='Active' and CURRENT_STATUS='Disabled'))
    ),

    t2 as (select
    count(*) as no_churn2
    from thorchain.update_node_account_status_events
    where (FORMER_STATUS='Ready' and CURRENT_STATUS='Active')
    )

    select
    no_churn1,
    no_churn2,
    sum(no_churn1+no_churn2)
    from t1,t2 group by 1,2
    Run a query to Download Data