SalehBot Activity-compare
Updated 2022-05-16
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 lst_bots as (
select
from_address as bot
,(select count(DISTINCT block_timestamp::date) from thorchain.swaps where from_address=s.from_address) as day_count
,count(TX_ID)/day_count as TPD
from thorchain.swaps s
group by 1
having TPD>=50
order by TPD DESC
)
,bots as (
select
block_timestamp::date as day
-- ,pool_name
,count(tx_id) as tx_count
,sum(FROM_AMOUNT_USD) as amount_usd
,sum(amount_usd) over (order by day) as amount_growth
from thorchain.swaps
where from_address in(select bot from lst_bots)
group by 1
order by 1
)
,Non_bots as (
select
block_timestamp::date as day
-- ,pool_name
,count(tx_id) as tx_count
,sum(FROM_AMOUNT_USD) as amount_usd
,sum(amount_usd) over (order by day) as amount_growth
from thorchain.swaps
where from_address not in(select bot from lst_bots)
group by 1
order by 1
)
select 'Bot' as Type ,* from bots
union all
Run a query to Download Data