Tobi_1steep-ivory
Updated 2024-07-30
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
›
⌄
⌄
WITH Daily_Transactions AS (
SELECT
DATE_TRUNC('DAY', BLOCK_TIMESTAMP) AS transaction_day,
COUNT(*) AS total_transactions
FROM
base.core.fact_transactions;
WHERE
BLOCK_TIMESTAMP >= DATEADD(DAY, -30, CURRENT_TIMESTAMP())
AND BLOCK_TIMESTAMP < CURRENT_TIMESTAMP()
GROUP BY
transaction_day
),
Daily_TPS AS (
SELECT
transaction_day,
total_transactions,
86400 AS seconds_in_day,
ROUND(total_transactions / 86400, 6) AS tps
FROM
Daily_Transactions
)
SELECT
transaction_day,
total_transactions,
tps
FROM
Daily_TPS
ORDER BY
transaction_day;
QueryRunArchived: QueryRun has been archived