MostlyData_Solana Stats - Fee vs time (global)
Updated 2025-03-10
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
›
⌄
-- forked from Solana Stats - Fee rewards distribution vs time @ https://flipsidecrypto.xyz/studio/queries/02fadac4-c64d-41dc-9d25-3a4634a83263
with date_filter as (
select
case
when '{{n_days}}' != 0 then current_date() - interval '{{n_days}} days'
else cast('{{start_date}}' as timestamp)
end as start_date,
case
when '{{n_days}}' != 0 then current_date()
else cast('{{end_date}}' as timestamp)
end as end_date
)
,txs_info as(
select
rf.tx_id,
date_trunc('hour',rf.block_timestamp) as dt,
rf.fee * pow(10,-9) as fee
from solana.core.fact_transactions rf
join date_filter df
on rf.block_timestamp between df.start_date and df.end_date
)
,group_fee_rewards as(
select
dt,
percentile_cont(0.25) within group (order by fee) as p25,
percentile_cont(0.5) within group (order by fee) as p50,
percentile_cont(0.95) within group (order by fee) as p95
from txs_info
group by dt
QueryRunArchived: QueryRun has been archived