with source as (
select
tx_sender as user,
count(tx_id) as transactions_count
from terra.core.fact_transactions
where TX_SUCCEEDED = 'TRUE'
and block_timestamp >= CURRENT_DATE - {{Past_X_Days}}
group by user)
select count(user), transactions_count
from source
group by transactions_count