with tab1 as (select signers[0] as user, count(distinct block_timestamp::date), case
when count(distinct block_timestamp::date)=1 then 'n=1'
when count(distinct block_timestamp::date)>1 and count(distinct block_timestamp::date)<=7 then '1<n<=7'
when count(distinct block_timestamp::date)>7 and count(distinct block_timestamp::date)<=30 then '7<n<=30'
when count(distinct block_timestamp::date)>30 then 'n>30'
end as "#Days of Activity"
from eclipse.core.fact_transactions
where succeeded='TRUE'
group by 1)
select "#Days of Activity", count(distinct user) as "Users Count"
from tab1
group by 1