freemartianking herald
Updated 2022-05-10
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
›
⌄
with list as (
select block_id, block_timestamp
from thorchain.update_node_account_status_events a
where exists (
select * from thorchain.update_node_account_status_events b
where a.block_id = b.block_id and b.former_status = 'Active'
and (b.current_status = 'Standby' or b.current_status = 'Disabled')
)
and exists (
select * from thorchain.update_node_account_status_events c
where a.block_id = c.block_id
and c.former_status = 'Ready'
and c.current_status = 'Active'
)
group by block_id, block_timestamp
)
select date_trunc('month', block_timestamp::date) as month, count(*) as churings_count
from list
group by month
order by month
Run a query to Download Data