boomer77ibc transfers bridges
    Updated 2022-03-13
    with raw as (select date(block_timestamp) as dt, tx_id, msg_value:sender::string as sender, msg_value:receiver::string as receiver,
    msg_value:source_channel::string as channel,
    msg_value:token:denom::string as denom, msg_value:token:amount/1e6 as amount, msg_module, msg_type, tx_type
    from terra.msgs
    where msg_type = 'applications/transfer.v1.MsgTransfer' and tx_status = 'SUCCEEDED')

    select date_trunc('day', dt) as dt, count(distinct sender) as unique_sender, count(distinct tx_id) as tx_count,
    channel, case
    when channel = 'channel-1' then 'osmosis'
    when channel = 'channel-16' then 'secret'
    when channel = 'channel-17' then 'injective'
    when channel = 'channel-19' then 'axelar'
    else null end as destination_chain
    from raw
    where denom in ('uusd', 'uluna') and channel in ('channel-1','channel-16', 'channel-17', 'channel-19')
    group by 1,4
    Run a query to Download Data