SELECT case
when currency = 'uosmo' then 'OSMO'
when currency = 'ibc/3FF92D26B407FD61AE95D975712A7C319CDE28DE4D80BDC9978D935932B991D7' then 'DOT'
end as type,
count(distinct tx_id) as tx_count,
count(distinct LIQUIDITY_PROVIDER_ADDRESS ) as user,
sum(amount/pow(10,decimal)) as amount,
avg(amount/pow(10,decimal)) as avg_amount
from osmosis.core.fact_liquidity_provider_actions
where pool_id = [773]
and action = 'pool_joined'
group by 1