Abbas_ra21Collected Fee Amount
Updated 2023-11-12
999
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
SELECT
'Ethereum' AS Chain,
sum(Amount * Price) AS "Collected Fee $"
FROM
ethereum.core.ez_token_transfers
LEFT JOIN ethereum.price.ez_hourly_token_prices AS p ON DATE_TRUNC('Hour', BLOCK_TIMESTAMP) = Hour
AND contract_address = TOKEN_ADDRESS
WHERE
(
TO_ADDRESS = lower('0x37a8f295612602f2774d331e562be9e61B83a327')
OR TO_ADDRESS = lower('0x6460D14DbAeb27AEfec8eBeF85dB35DefA31c3b9')
)
AND From_ADDRESS = lower('0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD')
and BLOCK_TIMESTAMP :: date >= '2023-10-16'
union
ALL
SELECT
'Arbitrum' AS Chain,
sum(Amount * Price) AS "Collected Fee $"
FROM
arbitrum.core.ez_token_transfers
LEFT JOIN arbitrum.price.ez_hourly_token_prices AS p ON DATE_TRUNC('Hour', BLOCK_TIMESTAMP) = Hour
AND contract_address = TOKEN_ADDRESS
WHERE
(
TO_ADDRESS = lower('0xD4cE1f1b8640c1988360a6729D9a73C85A0C80a3')
OR TO_ADDRESS = lower('0x34eCdAd9090CD133e63Cf6670f3A03Aa7F04fa74')
)
AND From_ADDRESS = lower('0xeC8B0F7Ffe3ae75d7FfAb09429e3675bb63503e4')
and BLOCK_TIMESTAMP :: date >= '2023-10-16'
union
ALL
SELECT
'Polygon' AS Chain,
sum(Amount * Price) AS "Collected Fee $"
FROM