select block_timestamp::date as date,
case
when contract_address = '0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2' then 'mkr'
when contract_address = '0x15ee120fd69bec86c1d38502299af7366a41d1a6' then 'bitant'
else symbol end as symbol,
sum(amount) as amount_deposited,
sum(amount_usd),
count(distinct(tx_hash)) as count
from ethereum.core.ez_token_transfers
where (to_address = lower('0x99c9fc46f92e8a1c0dec1b1747d010903e884be1') or to_address = lower('0x52ec2f3d7c5977a8e558c8d9c6000b615098e8fc'))
and date >= current_date - 60
and amount > 0
and amount_usd > 0
group by date,2