adriaparcerisasPolygon fees comparison
Updated 2022-07-08
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
poly_price as (
SELECT
trunc(hour,'day') as dates,
avg(price) as poly_price
from ethereum.core.fact_hourly_token_prices
where symbol='MATIC' and hour> CURRENT_DATE-INTERVAL '1 MONTH'
group by 1
),
poly as (
SELECT
trunc(block_timestamp,'day') as date,
avg(tx_fee*poly_price) as avg_fee_per_tx_usd
from polygon.core.fact_transactions x
join poly_price y on trunc(x.block_timestamp,'day')=y.dates
where block_timestamp> CURRENT_DATE-INTERVAL '1 MONTH' and tx_fee is not null
group by 1
),
avax_price as (
SELECT
trunc(hour,'day') as dates,
avg(price) as avax_price
from ethereum.core.fact_hourly_token_prices
where symbol='WAVAX' and hour> CURRENT_DATE-INTERVAL '1 MONTH'
group by 1
),
avx as (
SELECT
trunc(block_timestamp,'day') as date,
case when avg(tx_fee*avax_price) is null then avg(tx_fee*20) else
avg(tx_fee*avax_price) end as avg_fee_per_tx_usd
from avalanche.core.fact_transactions x
join avax_price y on trunc(x.block_timestamp,'day')=y.dates
where block_timestamp> CURRENT_DATE-INTERVAL '1 MONTH' and tx_fee is not null
group by 1
),
Run a query to Download Data