barbodDaily Total Swaps by Bots - Average Users
Updated 2022-05-02
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 tab1 as (
select
trader as trader1,
count(*)
from terra.swaps
where block_timestamp > current_date - 112
group by 1
order by 2 DESC
limit 72 )
, tabBot as (
select
date_trunc('day', block_timestamp) as date1,
count(*) as BOT
from terra.swaps
where trader in (select trader1 from tab1) and block_timestamp > current_date - 30
group by 1
)
,tabAverage as (
select
date_trunc('day', block_timestamp) as date2,
count(*) as Average_User
from terra.swaps
where trader not in (select trader1 from tab1) and block_timestamp > current_date - 30
group by 1
)
select
date1,
Run a query to Download Data