Azinaxl7. holder VS trader
    Updated 2022-12-03
    with buyer as
    (select sum(TO_AMOUNT/1e6) as buy_amount,
    trader as buyer from
    osmosis.core.fact_swaps
    where
    TO_CURRENCY='ibc/903A61A498756EA560B85A85132D3AEE21B5DEDD41213725D22ABF276EA6945E'
    and TX_STATUS='SUCCEEDED'
    group by buyer
    ),

    seller as
    (select sum(from_AMOUNT/1e6) as sell_amount,
    trader as seller from osmosis.core.fact_swaps
    where
    from_CURRENCY='ibc/903A61A498756EA560B85A85132D3AEE21B5DEDD41213725D22ABF276EA6945E'
    and TX_STATUS='SUCCEEDED'
    group by 2
    ),

    sender as
    (select sum(AMOUNT)/1e6 as send_volume,SENDER from osmosis.core.fact_transfers a inner join buyer b
    on a.SENDER=b.buyer
    where
    CURRENCY='ibc/903A61A498756EA560B85A85132D3AEE21B5DEDD41213725D22ABF276EA6945E'
    group by 2
    ),

    liquid as
    (select sum(AMOUNT/1e6) as liquid_volume,LIQUIDITY_PROVIDER_ADDRESS as li_user from osmosis.core.fact_liquidity_provider_actions where
    CURRENCY='ibc/903A61A498756EA560B85A85132D3AEE21B5DEDD41213725D22ABF276EA6945E'
    and LIQUIDITY_PROVIDER_ADDRESS in (select buyer from buyer)
    group by 2
    ),

    uni as
    (
    Run a query to Download Data