elsina2024-10-05: Daily New Users [Percentage] copy
Updated 2024-12-21
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 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('month', min_date) AS date,
COUNT(DISTINCT from_address) AS new_user_count
FROM
users
WHERE
min_date BETWEEN '2024-01-01' AND '2024-12-31'
GROUP BY
date
),
old_users AS (
SELECT
date_trunc('month', block_timestamp) AS date,
COUNT(DISTINCT from_address) AS old_user_count
FROM
thorchain.defi.fact_swaps
WHERE
block_timestamp BETWEEN '2024-01-01' AND '2024-12-31'
AND from_address IN (
SELECT from_address
FROM users
WHERE min_date < date_trunc('month', block_timestamp)
)
GROUP BY
QueryRunArchived: QueryRun has been archived