rajsUntitled Query
Updated 2022-10-18
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 active_users as
(
with joined_weeks as
(
SELECT
tx_from,
min(date_trunc('week', block_timestamp))::date as week_joined,
date_trunc('week', CURRENT_DATE) as current_week,
datediff('week', min(date_trunc('week', block_timestamp))::date, date_trunc('week', CURRENT_DATE)) as diff
from osmosis.core.fact_transactions
where block_timestamp <= '2022-10-16'
group by 1
-- limit 3
)
,
active_weeks as
(
SELECT
tx_from,
count(distinct week) as no_of_active_weeks
FROM
(
SELECT
date_trunc('week', block_timestamp) as week,
tx_from,
count(distinct block_timestamp::date) as no_of_active_days
from osmosis.core.fact_transactions
where block_timestamp <= '2022-10-16'
group by 1,2
having count(distinct block_timestamp::date) >= 4
)
group by 1
)
,
Run a query to Download Data