par_rnStellar 01
Updated 2025-02-18
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 TransactionSummary AS (
SELECT
COUNT(*) AS total_transactions,
COUNT(DISTINCT ACCOUNT) AS total_users
FROM stellar.core.fact_transactions
),
FeeSummary AS (
SELECT
SUM(FEE_CHARGED/power(10,7)) AS total_fees,
AVG(FEE_CHARGED/power(10,7)) AS avg_fee,
MAX(FEE_CHARGED/power(10,7)) AS max_fee
FROM stellar.core.fact_transactions
),
DailyTransactionCount AS (
SELECT
DATE_TRUNC('month', BLOCK_TIMESTAMP) AS transaction_date,
COUNT(*) AS transaction_count
FROM stellar.core.fact_transactions
GROUP BY transaction_date
ORDER BY transaction_date DESC
),
TopAccounts AS (
SELECT
ACCOUNT,
COUNT(*) AS transaction_count
FROM stellar.core.fact_transactions
GROUP BY ACCOUNT
ORDER BY transaction_count DESC
LIMIT 10
),
DailyFeeSummary AS (
SELECT
DATE_TRUNC('month', BLOCK_TIMESTAMP) AS transaction_date,
SUM(FEE_CHARGED/power(10,7)) AS total_fees
FROM stellar.core.fact_transactions
GROUP BY transaction_date