Sandeshnumber of unstake osmo
    Updated 2022-07-18
    with unstakes as
    (
    (
    select block_timestamp,TX_ID,currency,decimal,DELEGATOR_ADDRESS,VALIDATOR_ADDRESS,'normal_unstake' as "stake",'un' as act from osmosis.core.fact_staking
    where action='undelegate'
    and TX_STATUS='SUCCEEDED'
    )
    union
    (
    select block_timestamp,TX_ID,currency,decimal,DELEGATOR_ADDRESS,VALIDATOR_ADDRESS,'super_unstake' as "stake",'un' as act from osmosis.core.fact_superfluid_staking
    where action='Superfluiddelegate'
    )
    union
    (
    select block_timestamp,TX_ID,currency,decimal,DELEGATOR_ADDRESS,VALIDATOR_ADDRESS,'normal_stake' as "stake",'s' as act from osmosis.core.fact_staking
    where action='delegate'
    and TX_STATUS='SUCCEEDED'
    )
    union
    (
    select block_timestamp,TX_ID,currency,decimal,DELEGATOR_ADDRESS,VALIDATOR_ADDRESS,'super_stake' as "stake",'s' as act from osmosis.core.fact_superfluid_staking
    where action='SuperfluidUndelegate'
    )
    )
    select block_timestamp::date as "day",act,count(distinct tx_id) as cnt from unstakes
    group by "day",act
    order by "day" asc



    Run a query to Download Data