StangFAST04 - active days
Updated 2023-07-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 04 - new users @ https://flipsidecrypto.xyz/edit/queries/ddc9df6a-ff40-48ab-99e9-55ec3f3760a0
-- forked from 03 - new user @ https://flipsidecrypto.xyz/edit/queries/39e84d63-6dc8-429e-a0f1-67b2ee5ab8e7
-- forked from 01 - chart @ https://flipsidecrypto.xyz/edit/queries/5db0c3a2-37c3-4de0-8b3b-8e4131f5a395
with
new_aurora AS
(
SELECT
min( a.block_timestamp ) AS "min date"
, a.from_address AS "new user"
FROM
aurora.core.fact_transactions a
WHERE
a.from_address != a.to_address
GROUP BY 2
ORDER BY 1 DESC
)
,
type AS
(
SELECT
a.from_address AS "user"
, count( DISTINCT date_trunc( 'day' , a.block_timestamp ) ) AS "active days"
FROM
aurora.core.fact_transactions a
JOIN
new_aurora b
ON a.from_address = b."new user"
WHERE
a.block_timestamp::date > dateadd( 'month', -{{month}} , current_date )
GROUP BY 1
ORDER BY 2 DESC
)
Run a query to Download Data