MoeAPTOS Fee stats
Updated 2023-12-11
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
›
⌄
with prices as (
SELECT
TO_TIMESTAMP(value [0] :: string) as day,
'APT' as symbol,
value [1] as price
from
(
SELECT
livequery.live.udf_api(
'https://api.coingecko.com/api/v3/coins/aptos/market_chart?vs_currency=usd&days=90&interval=daily&precision=3'
) as resp
),
LATERAL FLATTEN (input => resp:data:prices)
)
select
BLOCK_TIMESTAMP :: date as date,
sum(GAS_USED * GAS_USED * (price / 1e9)) as fee_usd,
0 as revenue,
fee_usd as supplysidefee_usd,
0 as incentive
from
aptos.core.fact_transactions
left join prices on BLOCK_TIMESTAMP :: date = day
group by
1
having
fee_usd is not null
Run a query to Download Data