select
date_trunc('day',block_timestamp) as block_day, action, delegator_address, sum(event_amount) as LUNA_staked
from terra.staking
where tx_status = 'SUCCEEDED' and validator_address = 'terravaloper1hqyygjq0vdqk0xdpkffgamzr4f7tqqg5u9mg66' and block_day = '2021-06-30' and action = 'redelegate'
group by 1,2,3
order by 4 desc