KaskoazulAmount UST
    Updated 2022-03-15
    --Create a dashboard to track the outflows of LUNA and UST to Osmosis, Secret, Axelar, and Injective. What conclusions can you draw from the outflows thus far?


    select
    me.block_timestamp::date as fecha,
    --me.tx_id,
    case
    when event_attributes:receiver like 'osmo%' then 'osmosis'
    when event_attributes:receiver like 'axelar%' then 'axelar'
    when event_attributes:receiver like 'secret%' then 'secret'
    when event_attributes:receiver like 'inj%' then 'injection'
    when event_attributes:receiver like 'juno%' then 'juno'
    --when event_attributes:receiver like 'kava%' then 'kava'
    --when event_attributes:receiver like 'crc%' then 'crc'
    --when event_attributes:receiver like 'cosmos%' then 'cosmos'
    --when event_attributes:receiver like 'terra%' then 'terra'
    else 'other'
    end as network,
    sum(te.amount) as amount,
    sum(te.amount_usd) as amount_USD,
    te.currency as currency
    from terra.msg_events me
    inner join terra.transfer_events te
    on me.tx_id = te.tx_id
    where event_type = 'ibc_transfer'
    and fecha >= '2022-01-01'
    and currency in ('UST')
    group by fecha, network, currency

    Run a query to Download Data