with top_user as ( select from_address , count(DISTINCT(tx_hash)) as total
from gnosis.core.fact_transactions
where block_timestamp::date between '2022-10-05' and '2022-10-07'
group by 1
order by 2 desc
limit 5)
select min(block_timestamp) as date, from_address::string as user
from gnosis.core.fact_transactions
where from_address in ( select from_address from top_user)
group by 2