Tobi_1intermediate-sapphire
Updated 2024-09-18
99
1
2
3
4
5
6
7
8
9
10
›
⌄
SELECT
SUM(AMOUNT / POWER(10, DECIMALS)) AS total_amount_tokens, -- Calculate total amount in tokens (adjusted for decimals)
SUM(AMOUNT_USD) AS total_amount_usd -- Calculate total amount in USD
FROM
base.core.ez_token_transfers
WHERE
CONTRACT_ADDRESS = '0x532f27101965dd16442e59d40670faf5ebb142e4' -- Filter by the token address
AND
BLOCK_TIMESTAMP >= DATEADD(day, -30, CURRENT_TIMESTAMP); -- Only include transactions from the last 30 days
QueryRunArchived: QueryRun has been archived