Sandeshwho gets redelegates more ? osmo
    Updated 2022-07-18
    with restakes as
    (
    (
    select block_timestamp,TX_ID,currency,decimal,DELEGATOR_ADDRESS,VALIDATOR_ADDRESS as dest,REDELEGATE_SOURCE_VALIDATOR_ADDRESS as source,'normal_unstake' as "stake",'un' as act from osmosis.core.fact_staking
    where action='redelegate'
    and TX_STATUS='SUCCEEDED'
    )
    -- Not able to find redelgate yet
    -- union
    -- (
    -- select block_timestamp,TX_ID,currency,decimal,DELEGATOR_ADDRESS,VALIDATOR_ADDRESS as dest,ORIGINAL_SUPERFLUID_DELEGATE_TX_ID as dest,'super_unstake' as "stake",'un' as act from osmosis.core.fact_superfluid_staking
    -- where action='Superfluidredelegate'
    -- )
    )
    select block_timestamp::date,dest,count(tx_id) from restakes
    group by 1,2

    Run a query to Download Data