select
count(distinct tx_id) as count_transfer,
count(distinct sender) as count_user ,
sum(amount/pow(10,DECIMAL)) as volume,
regexp_substr (sender,'[a-z]+') as enter_chain
from osmosis.core.fact_transfers
where
receiver like 'osmo%'
AND transfer_type='IBC_TRANSFER_IN'
AND amount/pow(10,decimal) < 10000000
group by enter_chain
order by volume DESC
LIMIT 20
;