with table_1 as (
select DISTINCT ORIGIN_FROM_ADDRESS, sum(AMOUNT) as amount
from ethereum.core.ez_token_transfers
where ORIGIN_TO_ADDRESS = lower('0xd89a09084555a7d0abe7b111b1f78dfeddd638be') --deposit & deposit&delegate
and SYMBOL ilike 'ptausdc'
and not ORIGIN_FUNCTION_SIGNATURE = '0x9470b0bd' --withdrawal
and date(BLOCK_TIMESTAMP) >= '2022-05-01'
and date(BLOCK_TIMESTAMP) < '2022-06-01'
group by ORIGIN_FROM_ADDRESS)
select AVG(amount) as average_deposit_amount_per_user
from table_1