with wallets as (select tx_from as wallet, min(block_timestamp::date) as start_date
from osmosis.core.fact_transactions
group by 1),
votes as (select voter, min(block_timestamp::date) as first_vote_date
from osmosis.core.fact_governance_votes
where tx_status = 'SUCCEEDED'
group by 1)
select wallet, datediff('day', start_date, first_vote_date) as days_to_active
from wallets w
join votes v on w.wallet = v.voter
order by 2 desc
limit 10