carlesmontalaosmo avax 5
    Updated 2023-02-06
    select
    count (distinct tx_id) as n_swaps,
    count (distinct trader) as n_swappers,
    sum (from_amount/pow(10,from_decimal)) as volume,
    'outflow' as type
    from osmosis.core.fact_swaps
    where from_currency = 'ibc/6F62F01D913E3FFE472A38C78235B8F021B511BC6596ADFF02615C8F83D3B373'
    union all

    select
    count (distinct tx_id) as n_swaps,
    count (distinct trader) as n_swappers,
    sum (to_amount/pow(10,to_decimal)) as volume,
    'inflow' as type
    from osmosis.core.fact_swaps
    where to_currency = 'ibc/6F62F01D913E3FFE472A38C78235B8F021B511BC6596ADFF02615C8F83D3B373'