StangFAST01 copy
Updated 2023-05-28
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
›
⌄
-- forked from 01 @ https://flipsidecrypto.xyz/edit/queries/f04b6de2-8afc-4024-936e-662d8b44ae69
-- forked from 02 @ https://flipsidecrypto.xyz/edit/queries/476d368e-4f5a-4b8c-bf32-996e2bcd6761
-- forked from 01 @ https://flipsidecrypto.xyz/edit/queries/9ca44268-9d38-4372-86b0-d145ddd26dd3
with
ava_price AS
(
SELECT
date_trunc( 'day' , a.hour ) AS day
, avg( a.price ) AS price_usd
FROM
avalanche.core.fact_hourly_token_prices a
WHERE
a.symbol = 'WAVAX'
GROUP BY
1
ORDER BY
1 DESC
)
SELECT
date_trunc( 'month' , a.block_timestamp ) AS date
, count( DISTINCT a.from_address ) AS users
, count( DISTINCT a.tx_hash ) AS transactions
, sum( a.tx_fee * c.price_usd ) AS fees
, transactions / users AS transactions_per_user
, b.project_name AS projects
FROM
avalanche.core.fact_transactions a
Run a query to Download Data