select date_trunc('day', block_timestamp) as "date",
sum(amount) as "daily USDC",
sum("daily USDC") over (order by "date" asc) as "total USDC"
from flipside_prod_db.polygon.udm_events
where from_address = '0xf715beb51ec8f63317d66f491e37e7bb048fcc2d'
and to_address in ('0x5b3256965e7c3cf26e11fcaf296dfc8807c01073', '0x8de9c5a032463c561423387a9648c5c7bcc5bc90')
and contract_address = '0x2791bca1f2de4661ed88a30c99a7a9449aa84174'
group by 1
order by 1 asc