binhachonUntitled Query
Updated 2022-05-07
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
›
⌄
with tx_from as (
select
block_timestamp,
'Active user' as symbol,
value as user_address
from terra.transactions,
lateral flatten (input => tx_from)
--where tx_id = '625A7FCB6AAB442E08C065AE701C4580FB6F9DA1CB446A193523185AD005EA66'
),
tx_to as (
select
block_timestamp,
'Passive user' as symbol,
value as user_address
from terra.transactions,
lateral flatten (input => tx_to)
--where tx_id = '625A7FCB6AAB442E08C065AE701C4580FB6F9DA1CB446A193523185AD005EA66'
),
total as (
select
*
from tx_from
union
select
*
from tx_to
)
select
date_trunc('day', block_timestamp) as time,
symbol,
count(distinct user_address) as number_of_users
from total
group by 1, 2
Run a query to Download Data