Hessishlq - fee 24/12 - 25/01
Updated 2025-03-18
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 prices AS (
SELECT
date_trunc('day', hour) as price_date,
avg(close) as pr
FROM crosschain.price.fact_prices_ohlc_hourly
WHERE hour >= '2024-12-04'
and hour < '2025-01-15'
AND asset_id = 'ethereum'
AND provider = 'coingecko'
GROUP BY 1),
tx AS (
select
BLOCK_TIMESTAMP::date as date,
sum(fee/pow(10,9)) AS feth,
sum(fee/pow(10,9))*avg(pr) as fusd,
count(distinct tx_id) as txs
from eclipse.core.fact_transactions
join prices
on BLOCK_TIMESTAMP::date = price_date
WHERE BLOCK_TIMESTAMP >= '2024-12-04'
and BLOCK_TIMESTAMP < '2025-01-15'
AND INSTRUCTIONS[1]:programId = 'turboe9kMc3mSR8BosPkVzoHUfn5RVNzZhkrT2hdGxN'
AND SUCCEEDED = 'TRUE'
group by all)
SELECT
sum(feth) AS fee_eth,
sum(fusd) AS fee_usd,
sum(fusd)/sum(txs) AS avg_fee
FROM tx
QueryRunArchived: QueryRun has been archived