SELECT
event_inputs:pool as pool_no,
sum(event_inputs:amount)/pow(10,18) as USDC_amount
FROM ethereum.events_emitted
WHERE lower(contract_address) = lower('0xaFD2AaDE64E6Ea690173F6DE59Fc09F5C9190d74')
AND tx_succeeded = 'TRUE'
AND event_name = 'PoolAllocation'
GROUP by 1
order by 2 desc