datavortexusual
Updated 2025-01-09
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
›
⌄
WITH usuals AS (
SELECT
t.receiver AS address,
t.amount,
t.tx_hash
FROM $query('5a97545a-0ff4-4c37-aa3a-d6f5bdfbbe28') t
),
average_price AS (
SELECT
AVG(price) AS avg_price_usd
FROM ethereum.price.ez_prices_hourly
WHERE token_address = LOWER('0x35d8949372d46b7a3d5a56006ae77b215fc69bc0')
AND hour >= '2024-12-01'
AND hour <= '2024-12-31'
)
SELECT
'usuals' AS project,
COUNT(DISTINCT address) AS total_users,
SUM(CAST(amount AS DECIMAL(38, 0)) / CAST(1e18 AS DECIMAL(38, 18)) * avg_price_usd) AS total_amount_usd,
COUNT(DISTINCT tx_hash) AS total_transactions,
FROM usuals, average_price;
QueryRunArchived: QueryRun has been archived