Query editor
SELECT DISTINCTtr.blockchain,trades.tx_from AS paying_address,tr.evt_block_time,tr.evt_tx_hash,p.symbol AS token_fees,tr.value AS fee_value_in_token,(tr.value / POWER(10, p.decimals)) * p.price AS fee_value_in_usd --we get the price in usdFROM(SELECT*FROMevms.erc20_transfers -- this table contains the er20 transfers. we will look into it to find the fees transactionsWHERE((blockchain = 'ethereum'AND ("to" = 0x37a8f295612602f2774d331e562be9e61B83a327OR "to" = 0x6460D14DbAeb27AEfec8eBeF85dB35DefA31c3b9)AND "from" = 0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD) /* Ethereum */-- polygon/* OR (blockchain = 'polygon'AND (-- USDC collector"to" = 0xce946931adF7aFc0797DE2a76270A28458F487ED-- fee collector contractOR "to" = 0x6BC825a870804cBcB3327FD1bae051259AE4E98e)AND "from" = 0x643770E279d5D0733F21d6DC03A8efbABf3255B4)-- optimismOR (blockchain = 'optimism'AND (-- USDC collector"to" = 0xD4cE1f1b8640c1988360a6729D9a73C85A0C80a3-- fee collector contractOR "to" = 0xf90Bd9049774c5245DfCe01B3bc530B5B0a7F770)AND "from" = 0xeC8B0F7Ffe3ae75d7FfAb09429e3675bb63503e4)-- arbitrumOR (blockchain = 'arbitrum'AND (-- USDC collector"to" = 0xD4cE1f1b8640c1988360a6729D9a73C85A0C80a3-- fee collector contractOR "to" = 0x34eCdAd9090CD133e63Cf6670f3A03Aa7F04fa74)AND "from" = 0xeC8B0F7Ffe3ae75d7FfAb09429e3675bb63503e4)*/AND evt_block_time >= TRY_CAST('2024-01-01 00:00' AS TIMESTAMP) -- cgange the date here to see futher in the past.)) AS tr