cypherTerra Nakamote Coeffient over time
    Updated 2023-01-12
    --credits to ALI3N, tweaked for timeframe

    with DelegateTable2 as (
    select date_trunc (month,block_timestamp) as date,
    validator_address,
    sum (amount) as delegate_amount
    from terra.core.ez_staking
    where action ilike 'delegate'
    and tx_succeeded = 'TRUE'
    group by 1,2),

    UndelegateTable2 as (
    select date_trunc (month,block_timestamp) as date,
    validator_address,
    sum (amount) as undelegate_amount
    from terra.core.ez_staking
    where action ilike 'undelegate'
    and tx_succeeded = 'TRUE'
    group by 1,2),

    RedelegateTable2 as (
    select date_trunc (month,block_timestamp) as date,
    validator_address,
    sum (amount) as redelegate_amount
    from terra.core.ez_staking
    where action ilike 'redelegate'
    and tx_succeeded = 'TRUE'
    group by 1,2),

    RedelegateTable22 as (
    select date_trunc (month,block_timestamp) as date,
    validator_src_address,
    sum (amount) as redelegate_amount1
    from terra.core.ez_staking
    where action ilike 'redelegate'
    and tx_succeeded = 'TRUE'
    Run a query to Download Data