yasmin1 OVERVIEW
Updated 2025-05-02
99
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
›
⌄
WITH deploy_contracts AS (
SELECT
created_block_timestamp::date AS day,
COUNT(DISTINCT address) AS Contracts
FROM avalanche.core.dim_contracts
WHERE
created_block_timestamp::date >= CURRENT_DATE - INTERVAL '90 days'
GROUP BY created_block_timestamp::date
),
user_first_tx AS (
SELECT
from_address,
MIN(block_timestamp::date) AS first_tx_date
FROM avalanche.core.fact_transactions
GROUP BY from_address
),
daily_metrics AS (
SELECT
t.block_timestamp::date AS Date,
COUNT(DISTINCT t.tx_hash) AS Transactions,
COUNT(DISTINCT t.from_address) AS Users,
SUM(t.tx_fee * p.price) AS Fees,
AVG(t.tx_fee * p.price) AS Avg_Fee
FROM avalanche.core.fact_transactions t
JOIN avalanche.price.ez_prices_hourly p
ON date_trunc('hour', t.block_timestamp) = p.hour
WHERE t.block_timestamp::date >= DATEADD(month, -3, CURRENT_DATE())
AND p.symbol = 'WAVAX'
GROUP BY t.block_timestamp::date
)
SELECT
d.Date,
d.Transactions,
d.Users,
d.Fees,
d.Avg_Fee,
QueryRunArchived: QueryRun has been archived