with top_wallets as
(
select block_timestamp as date, from_address as address
from arbitrum.core.fact_transactions
where from_address != '0x0000000000000000000000000000000000000000'
union
select block_timestamp as date, to_address as address
from arbitrum.core.fact_transactions
where to_address != '0x0000000000000000000000000000000000000000'
)
select address as top_wallets, count(address) as no_of_txns
from top_wallets
where date >= current_date - 30 and date <= current_date
group by top_wallets
order by no_of_txns desc
limit 50