superfly10 Top axlUSDT origin
    Updated 2022-12-26
    with t1 as
    (select
    sum(case when to_CURRENCY='ibc/CBF67A2BCF6CAE343FDF251E510C8E18C361FC02B23430C121116E0811835DEF' then to_AMOUNT/1e6 else null end) as inbflow,
    sum(case when FROM_CURRENCY='ibc/CBF67A2BCF6CAE343FDF251E510C8E18C361FC02B23430C121116E0811835DEF' then FROM_AMOUNT/1e6 else null end) as outflow,
    TRADER
    from
    terra.core.ez_swaps

    group by TRADER),
    t2 as
    (select
    case when inbflow is null then 0 else inbflow end as infloww,
    case when outflow is null then 0 else outflow end as outfloww, *
    from t1
    )

    select sum(infloww-outfloww) as volume , TRADER from t2
    group by 2
    order by 1 asc
    limit 10


    Run a query to Download Data