with list as (
select tx_receiver as address, count(distinct(tx_hash)) as tx_num from near.core.fact_transactions
group by address
UNION ALL
select tx_signer as address, count(distinct(tx_hash)) as tx_num from near.core.fact_transactions
group by tx_signer
)
select address, sum(tx_num) as total_tx from list
group by address
having total_tx >= 100000
order by total_tx desc
limit 10