with t as (
select
date_trunc('week', block_timestamp) as week,
count (distinct tx_id) as txns_count,
count (distinct tx_sender) as active_wallets_count
from terra.core.fact_transactions
where fee_denom = 'uluna'
group by 1
)
select
avg(active_wallets_count) as average_active_wallets_count,
avg(txns_count) as average_txns_count
from t