Query editor
withwallet_tr as (SELECT*,row_number() over (partition by"from"order byblock_number desc) as row_numberFROMpolygon.transactions AS trWHEREEXISTS (SELECT1FROMquery_3153686 AS scWHEREsc.wallet_address = tr."from"))select"from" as wallet_address,sum((gas_price / 1e18) * gas_used) as gas_feefromwallet_trwhererow_number <= 50group by"from"order bysum((gas_price / 1e18) * gas_used) desclimit10