John_GaltPrism Total Staking Revenue Per Day in UST
Updated 2022-07-07
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
28
29
30
31
32
33
34
35
36
›
⌄
with table1 as (select
date(block_timestamp) as date,
sum(event_attributes:"1_amount") / pow(10, 6) as in_yluna_farm --into yluna farm
from terra.msg_events
where event_attributes:"1_to" = 'terra1p7jp8vlt57cf8qwazjg58qngwvarmszsamzaru'
and event_attributes:"1_action" = 'yluna_farming_bond'
and event_index = 3
group by 1
),
table2 as (select
date(block_timestamp) as date,
sum(event_attributes:"1_amount") / pow(10, 6) as in_regular_staking -- into regular staking
from terra.msg_events
where event_attributes:"1_contract_address" = 'terra1p7jp8vlt57cf8qwazjg58qngwvarmszsamzaru'
and event_attributes:"1_action" = 'bond'
and event_index = 3
group by 1
),
table3 as (select
date(block_timestamp) as date,
sum(event_attributes:"0_amount") / pow(10, 6) as out_yluna_farm -- out of yluna farm staking
from terra.msg_events
where event_attributes:"0_from" = 'terra1p7jp8vlt57cf8qwazjg58qngwvarmszsamzaru'
and event_attributes:"0_action" = 'yluna_farming_unbond'
and event_index = 3
group by 1
),
table4 as (select
date(block_timestamp) as date,
sum(event_attributes:"0_amount") / pow(10, 6) as out_regular_staking --gone out of regular staking
from terra.msg_events
where event_attributes:"from" = 'terra1p7jp8vlt57cf8qwazjg58qngwvarmszsamzaru'
and event_attributes:"0_action" = 'unbond'
Run a query to Download Data