KaskoazulNode Churning Events
Updated 2022-05-05
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 churn_out as (
select block_timestamp::date as fecha,
block_id,
concat_ws (' to ', former_status, current_status) as change,
case change
when 'Active to Standby' then 'Churn out'
when 'Active to Disabled' then 'Churn out'
when 'Ready to Active' then 'Churn in'
else 'pff'
end as churn,
count (node_address) as churning_events,
block_id - lag (block_id) over (partition by change order by fecha) as block_diff
from thorchain.update_node_account_status_events
where fecha >= '{{Timeframe}}'
and churn = 'Churn out'
group by 1,2,3,4
order by 1 desc
),
churn_in as (
select block_timestamp::date as fecha,
block_id,
concat_ws (' to ', former_status, current_status) as change,
case change
when 'Active to Standby' then 'Churn out'
when 'Active to Disabled' then 'Churn out'
when 'Ready to Active' then 'Churn in'
else 'pff'
end as churn,
count (node_address) as churning_events,
block_id - lag (block_id) over (partition by change order by fecha) as block_diff
from thorchain.update_node_account_status_events
where fecha >= '{{Timeframe}}'
and churn = 'Churn in'
group by 1,2,3,4
order by 1 desc
Run a query to Download Data