KARTODDaily bots count
Updated 2022-04-23Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
›
⌄
WITH temp AS (
SELECT
DATE_TRUNC('day', BLOCK_TIMESTAMP) AS "Day",
SENDER AS "Bots",
COUNT(DISTINCT TX_ID) AS "Transactions"
FROM terraswap.swaps
WHERE BLOCK_TIMESTAMP >= CURRENT_DATE() - INTERVAL'30 day'
GROUP BY "Day", "Bots"
HAVING COUNT(DISTINCT TX_ID) >= 30
)
SELECT
DATE_TRUNC('day', BLOCK_TIMESTAMP) AS "Day",
COUNT(DISTINCT SENDER) AS "Unique bots",
COUNT(DISTINCT TX_ID) AS "Transactions"
FROM terraswap.swaps
WHERE BLOCK_TIMESTAMP >= CURRENT_DATE() - INTERVAL'30 day' AND SENDER IN (SELECT "Bots" FROM temp)
GROUP BY "Day"
Run a query to Download Data