walemathsAverage tx fee ($FLOW)
Updated 2024-07-01
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
›
⌄
WITH flow_price AS (
SELECT
trunc(hour, 'hour') AS hour,
avg(price) AS price
FROM
flow.price.ez_prices_hourly
WHERE
symbol = 'FLOW'
GROUP BY
1
),
monthly_fees AS (
SELECT
trunc(block_timestamp, 'month') AS month,
avg(event_data:amount) AS avg_tx_fee_flow,
avg(event_data:amount * price) AS avg_tx_fee_usd
FROM
flow.core.fact_events x
JOIN
flow_price y ON trunc(x.block_timestamp, 'hour') = y.hour
WHERE
event_contract = 'A.f919ee77447b7497.FlowFees'
AND event_Type = 'FeesDeducted'
GROUP BY
1
ORDER BY
1 ASC
)
SELECT
AVG(avg_tx_fee_flow) AS avg_monthly_tx_fee_flow,
AVG(avg_tx_fee_usd) AS avg_monthly_tx_fee_usd
FROM
monthly_fees;
QueryRunArchived: QueryRun has been archived