Query editor
WITHlast_block_before_timestamp as (selectmax(number)fromethereum.blockswheretime < cast('{{EndTime}}' as timestamp)),first_block_after_timestamp as (selectmin(number)fromethereum.blockswheretime > cast('{{StartTime}}' as timestamp)),solver_cow_transfers as (selectevt_block_time as time,evt_tx_hash as tx_hash,"from",to,value / pow(10, 18) as amountfromcow_protocol_ethereum.CowProtocolToken_evt_Transferwhere"from" = 0xa03be496e67ec29bc62f01a428683d7f9c204930 -- Rewards Payout Safeand contract_address = 0xdef1ca1fb7fbcdc777520aa7f396b4e015f497aband evt_block_number > (select*fromfirst_block_after_timestamp)AND evt_block_number <= (select*fromlast_block_before_timestamp))selectsum(amount) as total_cow_rewards_spentfromsolver_cow_transfers