with req_tab as
(
SELECT
from_address,
count(*) as no_of_txs,
count(distinct date_trunc('week', block_timestamp)) as no_of_active_weeks
from arbitrum.core.fact_transactions
group by 1
-- order by 3 desc
-- limit 100
)
SELECT
no_of_active_weeks,
count(from_address) as no_of_users
from req_tab
group by 1
order by 1 desc