select
date_trunc(week, block_timestamp) as date,
sum(DECODED_LOG:amount/pow(10,18)) as unstaked_aave
from ethereum.core.ez_decoded_event_logs
where contract_address = lower('0x4da27a545c0c5b758a6ba100e3a049001de870f5') -- unstake aave contract
and block_timestamp>='2022-01-01'
and EVENT_NAME='Redeem'
and TX_STATUS='SUCCESS'
group by date