SELECT
date_trunc('day',block_timestamp) as time,
sum(AMOUNT) as token_amount,
sum(AMOUNT_USD) as amount_usd,
COUNT(TX_HASH) as amount_of_transactions
from ethereum.core.ez_token_transfers
where TO_ADDRESS='0x4da27a545c0c5b758a6ba100e3a049001de870f5'
and ORIGIN_TO_ADDRESS='0x4da27a545c0c5b758a6ba100e3a049001de870f5'
and SYMBOL='AAVE'
GROUP BY time