SniperNumber of New Users
Updated 2023-09-04
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
›
⌄
with tb1 as (
select
min(a.block_timestamp) as min_date,
b.PUBKEY_SCRIPT_ADDRESS as user
from
bitcoin.core.fact_outputs a
left outer join bitcoin.core.fact_inputs b on a.tx_id = b.tx_id
where
a.PUBKEY_SCRIPT_ADDRESS = 'bc1qw8wrek2m7nlqldll66ajnwr9mh64syvkt67zlu'
group by
2
),
tb2 as (
select
count(DISTINCT user) as new_users
from
tb1
where
min_date >= current_date - 30
),
tb3 as (
select
count(DISTINCT b.PUBKEY_SCRIPT_ADDRESS) as uniqe_users
from
bitcoin.core.fact_outputs a
left outer join bitcoin.core.fact_inputs b on a.tx_id = b.tx_id
where
a.PUBKEY_SCRIPT_ADDRESS = 'bc1qw8wrek2m7nlqldll66ajnwr9mh64syvkt67zlu'
)
select
uniqe_users as total_users,
new_users
from
tb2,
tb3
Run a query to Download Data