AVG_PERCENT_NEW_USERS | |
---|---|
1 | 60.046611992 |
elsina2024-10-05: Daily New Users [Percentage]
Updated 5 days ago
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 first_tx_of_each_users AS (
SELECT
from_address,
MIN(block_timestamp) AS min_date
FROM
thorchain.defi.fact_swaps
GROUP BY
from_address
),
new_users AS (
SELECT
date_trunc('day', min_date) AS date,
COUNT(DISTINCT from_address) AS new_user_count
FROM
first_tx_of_each_users
GROUP BY
date
),
all_users AS (
SELECT
date_trunc('day', block_timestamp) AS date,
COUNT(DISTINCT from_address) AS all_user_count
FROM
thorchain.defi.fact_swaps
GROUP BY
date
),
old_users AS (
SELECT
a.date,
a.all_user_count,
a.all_user_count - COALESCE(n.new_user_count, 0) AS old_user_count
FROM
Last run: 5 days ago
1
16B
5s