TheLaughingMan[avax] Txn fees
Updated 2022-06-28Copy Reference Fork
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
›
⌄
with prices as (
SELECT price, hour as hhtime from ethereum.core.fact_hourly_token_prices
WHERE
token_address = lower('0x85f138bfEE4ef8e540890CFb48F620571d67Eda3')
AND hour >= '2022-06-20'
),
base as (
SELECT
round(AVG(tx_fee*price), 3) as avg_txn_fee,
max(tx_fee*price) as max_txn_fee,
min(tx_fee*price) as min_txn_fee,
MAX(price) as token_price,
date_trunc('hour', block_timestamp) as htime
from avalanche.core.fact_transactions b
LEFT JOIN prices p ON p.hhtime = date_trunc('hour', b.block_timestamp)
WHERE 1=1
AND block_timestamp >= '2022-06-20'
GROUP by htime
)
SELECT
*
from base
Run a query to Download Data