Tobi_1internal-brown
Updated 2024-08-03
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
›
⌄
WITH Daily_Transactions_Fees AS (
SELECT
DATE_TRUNC('DAY', BLOCK_TIMESTAMP) AS transaction_day,
COUNT(*) AS total_transactions,
SUM(TX_FEE) AS total_fees
FROM
base.core.fact_transactions
WHERE
BLOCK_TIMESTAMP >= DATEADD(DAY, -30, CURRENT_TIMESTAMP())
AND BLOCK_TIMESTAMP < CURRENT_TIMESTAMP()
GROUP BY
transaction_day
)
SELECT
transaction_day,
total_transactions,
total_fees
FROM
Daily_Transactions_Fees
ORDER BY
transaction_day;
QueryRunArchived: QueryRun has been archived