Updated 2022-01-19
    with terra_bridge as (select
    date(block_timestamp) as dt,
    msg_value:from_address::string as users, 'tbridge' as bridges,
    count(distinct tx_id) as tx_count
    from terra.msgs
    where msg_value:to_address::string in ('terra13yxhrk08qvdf5zdc9ss5mwsg5sf7zva9xrgwgc', 'terra1rtn03a9l3qsc0a9verxwj00afs93mlm0yr7chk') and
    users in ('terra1v4wlv87kj2qsg4yat4hv05dgtd3l6fsz0d4uht') and
    tx_status = 'SUCCEEDED'
    group by 1,2),

    wormhole as (select
    date(block_timestamp) as dt,
    msg_value:sender::string as users, 'wormhole' as bridges,
    count (distinct tx_id) as tx_count
    from terra.msgs
    where msg_value:contract::string = 'terra10nmmwe8r3g99a9newtqa7a75xfgs2e8z87r2sf'
    and msg_value:execute_msg:initiate_transfer:asset:info:token:contract_addr::string is not null and tx_status = 'SUCCEEDED' and
    users in ('terra1v4wlv87kj2qsg4yat4hv05dgtd3l6fsz0d4uht')
    group by 1,2)

    select * from terra_bridge
    union
    select * from wormhole
    Run a query to Download Data