brian-terraTalis Delegators
    SELECT
    block_timestamp::timestamp as block_timestamp,
    NVL(LEAD(block_timestamp) OVER (PARTITION BY delegator ORDER BY block_timestamp), CURRENT_TIMESTAMP)::timestamp as next_timestamp,
    delegator,
    tx_id,
    LEAD(tx_id) OVER (PARTITION BY delegator ORDER BY block_timestamp) as next_tx_id,
    delegated,
    LEAD(delegated) OVER (PARTITION BY delegator ORDER BY block_timestamp) as next_delegated,
    IFF(total_delegated < 0, 0, total_delegated) as total_delegated,
    IFF(LEAD(total_delegated) OVER (PARTITION BY delegator ORDER BY block_timestamp) < 0, 0, LEAD(total_delegated) OVER (PARTITION BY delegator ORDER BY block_timestamp)) as next_total_delegated
    FROM (
    SELECT
    block_timestamp,
    msg_value:delegator_address::string as delegator,
    tx_id,
    DATEDIFF(second, block_timestamp, NVL(LEAD(block_timestamp) OVER (PARTITION BY msg_value:delegator_address ORDER BY block_timestamp), CURRENT_TIMESTAMP)) as second_until_change,
    CASE
    WHEN msg_type = 'staking/MsgDelegate' THEN msg_value:amount:amount / 1e6
    WHEN msg_type = 'staking/MsgUndelegate' THEN -msg_value:amount:amount / 1e6
    WHEN msg_type = 'staking/MsgBeginRedelegate' THEN
    CASE
    WHEN msg_value:validator_dst_address = 'terravaloper1qd0uk3wrw73x662y2gx4kaulrzlcky6275gl5s' THEN msg_value:amount:amount / 1e6 --redelegate to
    WHEN msg_value:validator_src_address = 'terravaloper1qd0uk3wrw73x662y2gx4kaulrzlcky6275gl5s' THEN -msg_value:amount:amount / 1e6 --redelegate from
    ELSE 0
    END
    ELSE 0
    END as delegated,
    SUM(
    CASE
    WHEN msg_type = 'staking/MsgDelegate' THEN msg_value:amount:amount / 1e6
    WHEN msg_type = 'staking/MsgUndelegate' THEN -msg_value:amount:amount / 1e6
    WHEN msg_type = 'staking/MsgBeginRedelegate' THEN
    CASE
    WHEN msg_value:validator_dst_address = 'terravaloper1qd0uk3wrw73x662y2gx4kaulrzlcky6275gl5s' THEN msg_value:amount:amount / 1e6 --redelegate to
    WHEN msg_value:validator_src_address = 'terravaloper1qd0uk3wrw73x662y2gx4kaulrzlcky6275gl5s' THEN -msg_value:amount:amount / 1e6 --redelegate from
    ELSE 0
    Run a query to Download Data