Pmisha-bmlMdxUser identification
Updated 2022-04-27
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
›
⌄
with t1 as(with users as(select
date_trunc('minute',block_timestamp) as min,
TX_FROM[0] as or_users,
count (tx_id) as no_transaction
from terra.transactions
where block_timestamp::date >= current_date - 60
group by 1, 2
having no_transaction < 20)
select 'Average users' as user_type,
count(distinct or_users) as total_users
from users),
t2 as ( with bots as(select
date_trunc('minute',block_timestamp) as min,
TX_FROM[0] as bot_users,
count (tx_id) as no_transaction
from terra.transactions
where block_timestamp::date >= current_date - 60
group by 1, 2
having no_transaction >= 20)
select 'BOTS' as user_type,
count(distinct bot_users) as total_users
from bots)
select * from t1 union all select * from t2
Run a query to Download Data