brian-terraDaily Unique Users
Updated 2022-06-28Copy Reference Fork
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
›
⌄
with from_wallets as (
select
date_trunc('day', t.block_timestamp) as date,
w.value as wallet
from
terra.transactions t,
lateral flatten(input => t.tx_from) w
where
tx_status = 'SUCCEEDED'
),
to_wallets as (
select
date_trunc('day', t.block_timestamp) as date,
w.value as wallet
from
terra.transactions t,
lateral flatten(input => t.tx_to) w
where
tx_status = 'SUCCEEDED'
)
select date, count(distinct wallet) as total_wallets
from
(select
*
from
to_wallets
union
select
*
from
from_wallets)
group by date
order by date
Run a query to Download Data