binhachonUntitled Query
Updated 2022-03-30
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
›
⌄
select
block_timestamp::date as time,
sum(amount) as daily_amount,
sum(daily_amount) over (order by time) as total_amount
from (
select
block_timestamp,
msg_value:execute_msg:send:amount::float/1e6 as amount
from terra.msgs
where 1 = 1 --tx_id = '694C9B53D87A8A005D1DF27F16B36AD7D3016F106BAFB66AA9953B60E26FA142'
and msg_value:contract::string = 'terra17wkadg0tah554r35x6wvff0y5s7ve8npcjfuhz'
and msg_value:execute_msg:send:contract::string in ('terra1p7jp8vlt57cf8qwazjg58qngwvarmszsamzaru', 'terra1ns5nsvtdxu53dwdthy3yxs6x3w2hf3fclhzllc')
and tx_status = 'SUCCEEDED'
union all
select
block_timestamp,
-msg_value:execute_msg:unbond:amount::float/1e6 as amount
from terra.msgs
where 1 = 1 --tx_id = '01B8D5A2DD8AB98D06911FBA10A7A7065C34A278B36351391372C81FDE2A6F9F'
and msg_value:contract::string in ('terra1p7jp8vlt57cf8qwazjg58qngwvarmszsamzaru', 'terra1ns5nsvtdxu53dwdthy3yxs6x3w2hf3fclhzllc')
and msg_value:execute_msg:unbond is not null
and tx_status = 'SUCCEEDED'
)
group by time
Run a query to Download Data