binhachonWhale Dependency Index - Test query
Updated 2022-01-25
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
26
27
›
⌄
with liquidity_share as (
select
tx_id,
block_timestamp,
event_attributes:receiver::string as receiver,
event_attributes:share::float/1e6 as share
from terra.msg_events
where tx_status = 'SUCCEEDED'
and event_type = 'from_contract'
and event_attributes:"1_action"::string = 'mint'
and event_attributes:"1_contract_address"::string = 'terra1t599xaj0lyyyjza86uskcqdy9aqy2txzdezyln'
union all
select
tx_id,
block_timestamp,
event_attributes:sender::string as sender,
-event_attributes:withdrawn_share::float/1e6 as share
from terra.msg_events
where tx_status = 'SUCCEEDED'
and event_type = 'from_contract'
and event_attributes:"2_action"::string = 'burn'
and event_attributes:"2_contract_address"::string = 'terra1t599xaj0lyyyjza86uskcqdy9aqy2txzdezyln'
)
select sum(share) from liquidity_share
Run a query to Download Data