CryptoLionTerra delegator churn dst
Updated 2021-08-31
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 txs as (
select
tx_id,
block_timestamp,
event_amount_usd,
currency
from terra.staking
where action = 'redelegate'
and block_timestamp >= getdate() - interval '4 months'
and tx_status = 'SUCCEEDED'
order by block_timestamp desc),
flabel as (
select
mg.tx_id,
mg.block_timestamp,
msg_value:validator_dst_address as dst,
label as dst_label,
msg_value:validator_src_address as src,
msg_value:delegator_address as delegator
-- msg_value/
from terra.msgs mg
inner join txs on mg.tx_id = txs.tx_id
inner join terra.validator_labels on operator_address = msg_value:validator_dst_address
order by mg.block_timestamp desc),
data as (
select
f.tx_id,
f.block_timestamp,
dst,
dst_label,
src,
label as src_label,
delegator,
event_amount_usd
from flabel f
inner join terra.validator_labels on operator_address = src
Run a query to Download Data