staderUST_swapped_to_whSD
    Updated 2022-03-29
    with to_whSD as (
    select
    msg_value:sender::string as user,
    sum(msg_value:coins[0]:amount::float/pow(10,6)) as ust
    from terra.msgs
    where
    msg_value:contract::string in ('terra1upuslwv5twc8l7hrwlka4wju9z97q8ju63a6jt')
    and tx_status = 'SUCCEEDED'
    and msg_value:execute_msg:swap is not null
    and msg_value:execute_msg:swap:offer_asset:info:native_token:denom = 'uusd'
    group by 1
    )

    select * from to_whSD
    Run a query to Download Data