select avg(EVENT_INPUTS:amount/1000000000000000000) as avg_inflow , date_trunc('day', block_timestamp) as block_day
from ethereum_core.fact_event_logs
where CONTRACT_ADDRESS='0xae78736cd615f374d3085123a210448e74fc6393'
and EVENT_NAME='TokensMinted'
and block_timestamp>= current_date -90
group by block_day
order by block_day