select date_trunc('Day', block_timestamp) as blocktime, sum(event_amount) as LUNA_amount, sum(event_amount_usd) as USD_amount from terra.staking
where validator_address in (select operator_address from terra.validator_labels where label = 'flipside')
and action in ('delegate', 'redelegate')
group by blocktime
-- union all
-- select date_trunc('Day', block_timestamp) as blocktime, -sum(event_amount) as LUNA_amount, -sum(event_amount_usd) as USD_amount from terra.staking
-- where validator_address in (select operator_address from terra.validator_labels where label = 'flipside')
-- and action = 'undelegate'
-- group by blocktime