TOTAL_TRANSACTIONS | TOTAL_FEES_IN_APT | TOTAL_FEES_IN_USD | AVG_FEE_PER_TRANSACTION_IN_APT | AVG_FEE_PER_TRANSACTION_IN_USD | |
---|---|---|---|---|---|
1 | 112278786 | 9092.733758 | 47174.846548458 | 0.000080983542 | 0.000420158147 |
datavortexAPTOS(
Updated 8 days ago
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
›
⌄
WITH TotalFees AS (
SELECT
SUM((gas_used * gas_unit_price) / 1e8) AS total_fees_in_apt,
COUNT(DISTINCT TX_HASH) AS total_transactions
FROM aptos.core.fact_transactions
WHERE success = 'true'
AND block_timestamp >= CURRENT_DATE - INTERVAL '1 MONTH'
),
APTPrice AS (
SELECT
avg(price) AS apt_price
FROM aptos.price.ez_prices_hourly
WHERE symbol = 'APT'
AND hour >= CURRENT_DATE - INTERVAL '1 MONTH'
)
SELECT
tf.total_transactions,
tf.total_fees_in_apt,
tf.total_fees_in_apt * ap.apt_price AS total_fees_in_usd,
tf.total_fees_in_apt / tf.total_transactions AS avg_fee_per_transaction_in_apt,
(tf.total_fees_in_apt / tf.total_transactions) * ap.apt_price AS avg_fee_per_transaction_in_usd
FROM
TotalFees tf,
APTPrice ap;
Last run: 8 days ago
1
71B
10s