elsinabot activity
Updated 2022-05-17
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
bot_address as (
select
date_trunc('day', block_timestamp) as date,
from_address as bots,
count(distinct tx_id) as number_of_swaps
from
flipside_prod_db.thorchain.swaps
group by 1, 2 having number_of_swaps >= {{max_txs_human}}
),
all_address as (
select
date_trunc('day', block_timestamp) as date,
count(*) as number_of_all_swaps,
count(distinct from_address) as number_of_all_address
from
flipside_prod_db.thorchain.swaps
group by 1
),
bot_count as (
select
date_trunc('day', block_timestamp) as date,
count(*) as number_of_bot_swaps,
count(distinct from_address) as number_of_bot_address
from
flipside_prod_db.thorchain.swaps a
left join bot_address b on from_address = bots
where block_timestamp::date = b.date
group by 1
)
select
b.date,
number_of_bot_swaps / number_of_all_swaps as bots_rate,
(number_of_all_swaps - number_of_bot_swaps) / number_of_all_swaps as user_rate,
number_of_all_swaps,
Run a query to Download Data