boomer77wormhole ust bridged
    Updated 2021-11-29
    with raw as (select block_timestamp, msg_value,
    msg_value:execute_msg:initiate_transfer:recipient_chain as chain, case
    when chain = 1 then 'solana'
    when chain = 2 then 'ethereum'
    when chain = 4 then 'BSC'
    when chain = 5 then 'polygon'
    else null end as terra_to_chain,
    msg_value:execute_msg:initiate_transfer:asset:amount/1e6 as amount,
    msg_value:execute_msg:initiate_transfer:asset:info:native_token:denom::string as uusd
    from terra.msgs
    where msg_value:contract::string = 'terra10nmmwe8r3g99a9newtqa7a75xfgs2e8z87r2sf'
    and msg_value:execute_msg:initiate_transfer is not null
    and msg_value:execute_msg:initiate_transfer:asset:info:native_token:denom::string = 'uusd')

    select terra_to_chain, sum(amount) as ust_volume, count(msg_value) as transaction_count, avg(amount) as average_amount
    from raw
    group by 1
    order by 4 desc
    Run a query to Download Data