articoloquintoActions after unstaking OSMO
Updated 2022-07-19
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
›
⌄
select 're-delegate' as action, count(*) as count from(
select date, dateadd(day, 1, date) as "date+1", delegator_address as delegator from(
select block_timestamp as date, DELEGATOR_ADDRESS
from osmosis.core.fact_staking
where block_timestamp >= '2022-01-01'
and action = 'undelegate'
and TX_STATUS = 'SUCCEEDED'
UNION
select block_timestamp as date, DELEGATOR_ADDRESS
from osmosis.core.fact_superfluid_staking
where block_timestamp >= '2022-01-01'
and action = 'SuperfluidUndelegate'
and TX_STATUS = 'SUCCEEDED')) as d
inner join(
select block_timestamp as date, DELEGATOR_ADDRESS as delegator
from osmosis.core.fact_staking
where block_timestamp >= '2022-01-01'
and action = 'redelegate'
and TX_STATUS = 'SUCCEEDED') as r
on d.delegator = r.delegator and r.date between d.date and d."date+1"
union
select 'provide liquidity' as action, count(*) as count from(
select date, dateadd(day, 1, date) as "date+1", delegator_address as delegator from(
select block_timestamp as date, DELEGATOR_ADDRESS
from osmosis.core.fact_staking
where block_timestamp >= '2022-01-01'
and action = 'undelegate'
and TX_STATUS = 'SUCCEEDED'
UNION
select block_timestamp as date, DELEGATOR_ADDRESS
from osmosis.core.fact_superfluid_staking
where block_timestamp >= '2022-01-01'
and action = 'SuperfluidUndelegate'
and TX_STATUS = 'SUCCEEDED')) as d
inner join(
Run a query to Download Data