--active
with t1 as(select
block_timestamp,
msg_value:sender as active_users,
count(tx_id) as transactions
from terra.msgs
where msg_value:sender is not null
group by 1,2
having transactions>3)
select
date_trunc('day', block_timestamp) as dt,
count(distinct active_users) as daily_wallets
from t1
group by 1