with
new_users as (
select * from (
select
value as user,
min(block_timestamp) as first_use,
count(distinct tx_id) as txs
from terra.transactions t,
lateral flatten(input => t.tx_from)
group by 1
)
where first_use > current_date - interval '90 days'
)
select
txs,
count(user) as users
from new_users
group by 1
-- limit 100