boomer77ibc osmosis tx
Updated 2022-03-13
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
›
⌄
with raw as (select date(block_timestamp) as dt, 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'),
luna as (select date_trunc('day', dt) as dt, count(distinct sender) as sender, channel, denom, sum(amount) as vol, 'LUNA' as symbol
from raw
where channel in ('channel-1') and denom in ('uluna')
group by 1,3,4),
ust as (select date_trunc('day', dt) as dt, count(distinct sender) as sender, channel, denom, sum(amount) as vol, 'UST' as symbol
from raw
where channel in ('channel-1') and denom in ('uusd')
group by 1,3,4)
select a.dt, a.sender as luna_address, b.sender as ust_address, a.vol as luna_vol, b.vol as ust_vol
from luna a
left join ust b on a.dt = b.dt
Run a query to Download Data