with fees as (select tx_id, amount_usd
from polygon.udm_events
where to_address = '0x5b3256965e7c3cf26e11fcaf296dfc8807c01073' and amount_usd is not null),
nft as (select tx_id, contract_address
from polygon.udm_events
where event_type = 'erc20_transfer' and amount is null and symbol is null)
select sum(A.amount_usd) as Total_fees_collected, B.contract_address
from fees A
join nft B on A.tx_id = B.tx_id
group by 2
order by 1 desc
limit 10